The Spaniard had looked in serious discomfort as he saw off Karen Khachanov in the quarter-finals, needing a medical time-out after the third game of the second set to have tape applied under his right knee.
Nadal remains without a title since Toronto in August a year ago and a win over Federer since the Australian Open in 2017 but with a four-week break he will re-emerge for the clay-court season in Monte Carlo before yet another French Open at Roland Garros.
Federer said he might not feel quite the same tingle of anticipation as fans at the prospect of facing Nadal, but he acknowledged that their clashes always raise the stakes.
"Probably it's more than 1,100 matches on tour, more than any surface", the 32-year-old Spaniard said.
"I don't have doubts today that I will be ready for Monte Carlo", he said.More news: Meghan Markle possibly starting maternity leave
More news: Beto O'Rourke will seek 2020 Democratic presidential nomination
More news: UEFA Champions League Quarter-Final Draw Revealed
"It's not going to be easy", said Thiem, who has split four prior meetings with Federer 2-2. "It's about what it means for me to have to pull out in a tournament that I love so much like this one, and in the semi-finals after playing well during the whole tournament", Nadal said.
Nadal had enjoyed a dominant week at Indian Wells, reaching the semi-finals without dropping a set.
Andreescu will play two-time major champion Angelique Kerber, who ended 23rd-seeded Belinda Bencic's run of upsets with a 6-4, 6-2 victory. "This surface and also the one in NY, for example, it suits me pretty well because it's bouncy, especially during the day", Thiem said.
Nadal trailed 6-5 before Khachanov's forehand error forced the second tiebreaker, which Nadal dominated to close out the match that lasted just over two hours.
"Not that I didn't expect it", Federer said, "but it definitely went better than I thought it would".