Ronaldo did not enter the field until the 58th minute of the contest as Los Blancos head coach Zinedine Zidane continued to ease the attacker back into action after representing Portugal at the 2017 Confederations Cup earlier this summer.
The 32-year-old picked up a booking for removing his shirt after scoring Real Madrid's second in the 80th minute, before being handed a second yellow card for a perceived dive inside the Barcelona penalty box less than two minutes later.
Had matters stopped there, Ronaldo would have served a one-game suspension, but the Portuguese pushed the referee in the back after the red card was produced, which has seen his ban rise to five matches.
Ronaldo, who has 10 days to appeal the decision, will be available to play in the Champions League, but will not be free to represent the Spanish champions in La Liga until the clash with Real Betis on September 20.
Marco Asensio added to Ronaldo's late strike at Camp Nou as Real Madrid secured a 3-1 first-leg advantage ahead of Wednesday night's return at the Bernabeu.