Torres has failed to open his Chelsea account since his £50 million move from Liverpool and he was widely criticised for his performance during the Champions League defeat to Manchester United this week.
Rooney, though, put in a fine performance at Old Trafford on Tuesday to continue his recent resurgence, and Ancelotti believes Torres can follow his example.
"Obviously he's not happy, and he is disappointed, but it's not easy for him to manage at this moment," he said. "He has to show character.
"Rooney lived the same situation: he was not playing well and not scoring, but everyone at the club maintained good confidence with him.
"Everyone believed that he could move on, and he moved very well. Now Rooney has come back to playing fantastic football.
"Torres is the same. One goal will give him the opportunity to move on quickly. Torres is a fantastic transfer, not just for the present but also the future.
"To judge him now is not right. We have to wait. He will be a fantastic player for the future of Chelsea."
Former Livepool boss Rafael Benitez, meanwhile, feels Torres is struggling at Chelsea because Ancelotti cannot communicate with the striker in Spanish.
"He has a good mentality, he has good quality and his relationship with me was good also because we could talk in Spanish," he told Metro. "When we needed to say something in Spanish, we could say it clearly and we were not hiding anything."