Cristiano Ronaldo scored the decisive goal in El Clásico before being sent off the pitch and pushing a referee.