Casillas, who is captain of the club, has not played a league match since January 2013 after being dropped by former manager Jose Mourinho.
Diego Lopez has been preferred, leading to rumours that the 32-year-old could exit the Spanish capital.
"This team has some very important players that represent this club," Ancelotti said.
"For this reason we will do our all so that Casillas finishes his career at Real."
Ancelotti also praised midfielder Xabi Alonso, following his decision to sign a new two-year deal at the club.
The Real coach compared the midfield maestro to Italian veteran Andrea Pirlo and said he is a much-loved figure at the club.
"He's important to us for his quality, experience and how he plays," he added.
"There's nobody else around at his level. You can compare him with Pirlo, but Andrea is 35 years old.
"Xabi is younger and everybody at Real loves him. He's a great signing, but I don't like a team depending on one player – not Xabi, nor anybody."