The defender was dismissed for the 17th time in his Real career for a 26th-minute foul on Umut Bulut, although the Turkey striker appeared to make the most of minimal contact when through on goal.
Despite that setback, goals from Gareth Bale, Alvaro Arbeloa, Angel di Maria and Isco eclipsed Bulut's first-half equaliser as Real qualified for the knockout stage, setting a new UEFA Champions League record by scoring in 30 consecutive games in the process.
And Ancelotti was content with his side's display.
"The team played very well, especially when we were one man down in the second half," the Italian coach said.
"We played with courage and personality.
"It's true that the first half wasn't very good but we dominated and the game changed after Ramos' red card.
"We need to continue like this and stay consistent. I can't complain, I'm very happy."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.