The Spaniard broke the course record with a 61 on day three at Chapultepec Golf Club and birdied four of his first five holes on Sunday to get to 15 under after ten.
Rahm could replace McIlroy at the top of the Official World Golf Ranking if he gets the defence of his Race to Dubai title off to a winning start with what would be a third consecutive European Tour victory.
In the penultimate group, McIlroy and Rahm both got up and down for birdies on the first but it was Rahm who found another gear, getting up and down again on the second and putting a tee shot to four feet on the third.
Thomas and Reed both made birdies after finding sand off the tee at the first, while Van Rooyen also took advantage of the 316 yard par four thanks to an excellent chip.
The leader did well to save par after hitting a cart path and flying a long way over the second green, but he had company at the top as Van Rooyen again got up and down from just in front of the green.
Both of the men at the top missed the green at the third and bogeys put Reed in a share of the lead, before Rahm rolled home from 13 feet at the fifth to make it a four way tie.
McIlroy had birdied the fourth with an approach to five feet to become the nearest challenger at two back.
Rahm saved par at the sixth despite finding the water at the par five, while McIlroy got within one after nearly holing a chip for eagle.
He was not there for long, however, as Thomas holed from the fringe at the fifth to edge back ahead.
DeChambeau had missed good chances on the first and second but he put his tee shot to to five feet at the third, made the most of the sixth and chipped in at the seventh to join McIlroy at 14 under.
He dropped a shot on the next but stayed just two back after Thomas found water off the seventh tee and dropped back into a four way tie.
Another poor tee shot on the eighth dropped Thomas out of the lead and he was alongside DeChambeau as the 2019 Dubai Desert Classic winner out an approach to three feet on the ninth.
DeChambeau was flying and a six foot putt on the tenth moved him into a share of the lead.