The 57-year-old succeeded Pep Guardiola at the Allianz Arena ahead of the 2016-17 campaign, signing a three-year deal with Bayern. While his side have been criticised for their relatively slow start to the season, Ancelotti's men now sit three points clear of RB Leipzig in the Bundesliga, having won each of their last seven competitive matches.
Nagelsmann, 29, however, is generating discussion in the football world as his side sit third in the German top flight and remain unbeaten.
There is little doubt in Germany that Nagelsmann is set for a bright future as a trainer, and while reports have already seen him linked to one of the top jobs in Europe at the Bavarian side, Ancelotti is not thinking about making way him just yet and has told him he must be patient.
"I would like it for him if he becomes Bayern coach one day," Ancelotti told a news conference.
"Maybe he can become Bayern coach in 10 or 20 years. He certainly has quality. He is doing a great job at the moment. I wish him all the best.
"But I hope to stay at Bayern for 10 more years and why not 20 more years?
"I have a contract for three years. I am feeling very well here. I am feeling at home at this club, with this team and in this fantastic city. And the media are not bad either.
"This is not the moment to talk about my contract, though. There is still a lot of time for that. I just want to enjoy a good season."
Bayern face an away trip to 15th-placed Werder Bremen on Saturday, at which time Hoffenheim travel to RB Leipzig looking to chip away at the eight point gap between them.