Khedira has been out of action since tearing his anterior cruciate ligament while on international duty with Germany last November, an injury that placed the 27-year-olds hopes of featuring at this years FIFA World Cup in severe doubt.
However, the former Stuttgart man began training again last week, and Ancelotti is confident that he could make a return to action before the end of the club campaign.
Khedira is training very well, has recovered well, Ancelotti said ahead of Reals UEFA Champions League semi-final first leg with Bayern Munich on Wednesday.
I feel that he will play again before the end of the (club) season.
Khedira has won 44 caps for Germany and will hope to convince Germany coach Joachim Low to call him up for the World Cup despite his prolonged spell on the sidelines.
Germany start their quest for a fourth World Cup win on June 16 against Portugal, before then taking on Ghana and United States in Group G.