Messi was watching the game on a television in hospital as Luis Suarez and Philippe Coutinho put his team two up inside half an hour at La Rosaleda Stadium yesterday, before Samuel Garcia was sent off in the 30th minute for a dangerous tackle on Jordi Alba.
Down a man and without a win in 12 matches, Malaga might have feared a rout but Barca settled for a straightforward victory, perhaps with one eye on Wednesday's Champions League last-16 clash against Chelsea.
In particular, Dembele's brilliant turn and pass was bettered only by Coutinho's flicked finish for what was a superb second goal.
The win means Barca extend their advantage over second-placed Atletico Madrid, who can pull the deficit back to eight points with a win over Celta Vigo on Sunday.
More From This Section
Malaga, meanwhile, remain rooted to the bottom of the table.
Ronaldo headed in an 84th-minute winner at the Ipurua Municipal Stadium, having earlier put Real in front with an emphatic near-post finish. Eibar's Ivan Ramis had equalised in between to give the home side hope.
But Ronaldo's two goals mean he has now scored in seven consecutive games and boasts a remarkable 13 goals overall in that period.
The 33-year-old's tally for club and country this season stands at 35 goals in 37 appearances.
Real move four points behind second-placed Atletico Madrid, while Eibar stay eighth.
After securing a 5-2 aggregate victory over Paris Saint-Germain in the Champions League last 16 on Tuesday, Real swapped the Parc des Princes for the smallest ground in La Liga, with a capacity of just over 7,000.
They were below their best and rode their luck late on when Eibar should have converted a pair of excellent chances, before Ronaldo made them pay.
Modric was excellent throughout, the Croatian providing a sublime pass with the outside of his foot for Ronaldo's opener.
"It's true that after 15, almost 20 days, Luka came in and played a great game," Zidane said.
"He is an important player for us and what he has done, he has done very well."
Valencia remain a point behind Real and all but ended Sevilla's hopes of finishing in the top four by beating Vincenzo Montella's men 2-0.