The 24-year-old appeared to be a huge doubt for the weekend contest when he was forced off in the latter stages of Tuesday's Champions League clash with RB Leipzig due to a calf issue.
"Brahim took a knock on his ankle and the calf, they'll assess him tomorrow. I don't think it's a muscular issue," Ancelotti told reporters in the immediate aftermath of the Leipzig clash.
The attacker's spot in the squad on Sunday has now been confirmed, and he could again start due to the absence of Jude Bellingham with an ankle problem.
Diaz was on the scoresheet against Leipzig and has now managed eight goals and three assists in 28 appearances for his capital side during the 2023-24 campaign.
Antonio Rudiger remains out with a thigh problem, while David Alaba, Eder Militao and Thibaut Courtois are all still sidelined with ACL injuries.
Los Blancos will also be missing Ferland Mendy through suspension on Sunday due to the milestone yellow card that he picked up against Girona in the league last time out.
Aurelien Tchouameni will again be needed to play in the middle of the defence, and Ancelotti was full of praise for the France international for his transition into that position.
"When the centre-backs return, Tchouameni's role is not as a centre-back. His role is as a pivot, which is why we signed him," said Ancelotti during his press conference on Saturday.
"He can contribute as a centre-back and he is getting used to a new role. It means he is very, very intelligent."
Meanwhile, Ancelotti is expecting an 'extra-motivated' Rayo outfit this weekend, with the team changing their manager ahead of this match, bringing in Inigo Perez as a replacement for Francisco.
"Vallecas is always complicated. The opponent needs points and they have changed coach this week and so they have extra motivation," he said.
Youngster Jacobo Ramon again benefits from the defensive absentees to be named in the squad.
Real Madrid squad vs. Rayo Vallecano:
Lunin, Kepa, Pineiro; Carvajal, Nacho, Vazquez, F Garcia, Jacobo; Kroos, Modric, Camavinga, Valverde, Tchouameni, Ceballos, Guler; Vinicius, Rodrygo, Joselu, Brahim