The two will play Friday at a to-be-determined time. Nadal has a 23-15 head-to-head record against Federer and has won all five meetings against the Swiss at Roland Garros.
"If I came back on clay, it's also perhaps to play Rafa," Federer said. "Here it is. I have the match."
Rain forced over an hour-long suspension of play. Nadal's match was halted during the third set and Federer's in the fourth set.
TV cameras caught Nadal's frustration when he learned he had to leave the court because of weather. Nadal, who turned 33 on Monday, was only eight points from winning.
Nadal clinched his victory shortly after returning to the court.
Nadal is an 11-time French Open champion. Federer's lone French Open win came in 2009.
Federer has not played in the French Open since 2015.