Rock went three clear with the calmest of seven foot birdie putts on the sixth and Woods had to work hard to keep his deficit to that after losing his ball control in the windier conditions.
By the turn, though, the gap was back to one. Rock was twice in rough on the long eighth and bogeyed, then Woods made a seven footer of his own for birdie on the ninth.
They turned at 13 under and 12 under respectively, while Scot Lawrie was alone in third two back and McIlroy, having bogeyed the short seventh, three behind with Dane Thomas Björn and Italian Francesco Molinari.
Graeme McDowell was too far back to challenge for the title, but a hole-in-one on the 12th - the third of the week there - brought him to eight under and earned him an annual three-night stay in the five-star Emirates Palace hotel for life like Sergio Garcia and Jose Manuel Lara.
There was another bogey six from the final group at the tenth, but this time it was Woods who made it after finding a bunker off the tee and then another by the green.
Rock's par five put him two in front again and Woods was in severe danger of falling further behind on the next, but after a really poor approach into deep rough he saved par from 15 feet and Rock missed a 12 foot birdie chance.
The fist-pump from the American when his ball dropped showed how important he felt it was.
Lawrie started for home with three pars to be joint second and by doing the same McIlroy found himself in a five-way tie for fourth.