World number two Scheffler, the defending champion in Phoenix, had a 10-under-par total of 132 and Spain's third-ranked Rahm was his nearest rival in the clubhouse after a five-under-par 66 for 134.
Overnight co-leader Adam Hadwin of Canada was eight-under through 10 holes when darkness halted play in the US PGA Tour event at TPC Scottsdale, which has been in catch-up mode since a morning frost delay on Thursday.
Both Scheffler and Rahm have a chance to overtake Northern Ireland star McIlroy atop the world rankings this week. McIlroy was three-under for the tournament through 13 holes of the second round.
Scheffler teed off on the 10th and after a birdie at the 12th he electrified the raucous crowd at the par-three 16th with a tee shot that took a bounce and rolled toward the cup -- only for a gust of wind to carry it off the green.
"It should have been probably six feet on left side of the hole," Scheffler said. "It ended up being like 20 feet off the green. It was weird. Tough break."
He ended up with a par, but then reeled off four straight birdies -- driving the green at the 17th then draining a 23-footer at 18. He made seven-foot birdie putts at the first and second, and short-range birdies at the sixth and ninth.
"I think around this place when you're hitting fairways and you're hitting it well, the golf course can kind of open up for you," Scheffler said. "But the opposite can happen in a hurry because there's trouble lurking on basically every hole with there being desert close by. When you're hitting it well you have to take advantage of it like I did today."
Scheffler posted his first US tour win in Phoenix last year, and went on to win at Bay Hill and The Masters before reaching number one with a victory at the WGC Match Play.
McIlroy has since ascended to number one while Rahm is threatening to return to the summit after victories at the Tournament of Champions and in La Quinta, California, this year.
Rahm also teed off on 10 and after an early bogey he birdied the 13th and eagled 15 with a hole out from a greenside bunker. He added a birdie at 16 and two more coming in at the second and third.
"I played really good," Rahm said. "I hit a lot of great tee shots out there today. A lot of good iron shots that didn't end up in great spots.
"I think seven, eight nine is a clear example of it. None of those was bad. All of them were off the green and I needed to get up-and-down to get the round going.
"It's golf and it's what happens out here."
© 2023 AFP