Madrids spot in the final four of the Champions League was in jeopardy after Juventus battled back from a 3-0 defeat in the first leg to score three times at the Santiago Bernabeu.
The Italian champions looked set to force extra time before referee Michael Olivier awarded a penalty to Madrid for Mehdi Benatias foul on Lucas Vazquez.
Juventus players were furious with the penalty decision and Gianluigi Buffon was sent off for his excessive protests towards the Premier League official.
Ramos, meanwhile, was forced to watch the game from the stands after picking up a ban in the first leg in Turin.
But the Madrid captain could now miss the semi-final against one of Liverpool, Bayern Munich or Roma after he left his seat in the stands to stand in the mouth of the tunnel by the pitch.
Ramos was also involved in a brief altercation with Juventus boss Massimiliano Allegri during the moments before Cristiano Ronaldos penalty.
According to UEFA rules, a suspended player is not permitted to be in that area of the stadium during the game and in the immediate aftermath.
A Madrid insider also informed Spanish radio station Cadena COPE that the club officials were aware that Ramos was breaking UEFAs stipulations but nobody informed the defender.
Reports have also claimed that there was a bust-up in the tunnel after the match as upset Juventus players confronted referee Oliver and some of Madrids players, who were celebrating.
Should Oliver reference Ramos in his post-match report, it is likely that he will face another ban for the semi-final.
More: Real Madrid