The England striker converted from close range after beating the hosts' offside trap just after half-time. Danny Swailes levelled almost immediately for Brian Horton's side, but United eventually won courtesy of Fraizer Campbell's acrobatic 71st-minute header.
Rooney, Rio Ferdinand and Edwin van der Sar all completed at least 45 minutes in a useful, competitive run-out against the Silkmen.
Former United Reserves keeper Tommy Lee, released this summer, thwarted United throughout the first half with some fantastic saves. Rooney was denied twice, but easily the best save was reserved for a close-range Paul McShane header, which was somehow clawed away from virtually on the goal-line.
United took the lead just after half-time, as substitute Ritchie Jones saw his shot diverted in by a clever flick from Rooney. Swailes drew the hosts level two minutes later, firing in from close range via a deflection off Darron Gibson.
The Reds kept pressing, with Giuseppe Rossi continually going close but failing to find his first pre-season goal. The winner came with 20 minutes remaining. Lee Martin's left-wing free-kick was brilliantly headed in by Fraizer Campbell, who twisted in mid-air to convert from close range.
The evening's only downside saw David Jones taken to hospital with a potentially serious arm injury.