The versatile defender received his marching orders in the second half, but did not leave the pitch before telling the man in black how he felt
Ramos was handed a second yellow card for kicking out at Augusto Fernandez in the 73rd minute of the encounter, and the 26-year-old verbally attacked him before walking off as he felt he was being treated unfairly.
"You're a crook. You have been trying to f*** us all game long," the defender repeatedly said to the referee, according to his post-match report.
The centre-back then went on to insult the fourth official, too, before making way to the dressing room.
"On his way out, he approached the fourth official, saying: 'It's the same as always you scoundrels.'"
Meanwhile, Ramos has acknowledged that he verbally attacked the referee after his dismissal.
"I am disappointed with the red card. I know this referee for quite some time now and I have never had a good feeling about him.
"Sometimes you say things in the heat of the moment that you shouldn't say. I apologise for that."
Madrid qualified for the quarter-final of the competition following Wednesday's victory, after losing the first leg 2-1.