Rooney scored with United's first attack at the Etihad Stadium, before City were reduced to ten men when Vincent Kompany was harshly given a straight red card after just 14 minutes.
Welbeck and Rooney made it 3-0 at half time, but City fought back courageously after the interval with Aleksandar Kolarov and Sergio Aguero's goals creating a thrilling finale as United just held on to go into the hat for the fourth round draw.
City started brightly but United took the lead with their first attack of the game on 10 minutes as Rooney started the attack before the ball went out wide on the right to Antonio Valencia. His cross back into the centre then found Rooney who got up well to power his header off the underside of the crossbar.
Two minutes later City were reduced to ten men when Kompany went in two-footed on Nani but clearly won the ball without connecting with the Portuguese star.
However, referee Chris Foy deemed the tackle to be worthy of a red card which left City with a mountain to climb.
They almost equalised within two minutes but United keeper Anders Lindegaard produced a fine save to tip Aguero's curling shot round the post.
United did go two-up on the half-hour when Nani played in Patrice Evra down the left side of the area and, while his cross appeared to be blocked with Nigel De Jong looking the favourite to complete the clearance, Welbeck got their first to turn and impressively volleyed past City keeper Costel Pantilimon.
Things went from bad to worse for City on 39 minutes when Kolarov clearly brought down Welbeck inside the area to concede a penalty.
Rooney stepped up and, after Pantilimon had done well to save his initial spot-kick, the ball bounced up kindly for the United man to head into the empty net from close range.
Welbeck almost made it four in stoppage time but he could not divert Valencia's cross into the net from close range.
City got back into the game in the second minute of the second half when Kolarov curled his 25-yard free kick beyond the diving Lindegaard after Evra fouled Micah Richards as he charged towards the United area.
However, United continued to keep possession of the ball and should have had a penalty on 62 minutes when Kolarov bundled over Valencia just inside his own area.
City capitalised on that escape by grabbing a second just two minutes later when the returning United star Paul Scholes' error let in James Milner down the right. His low cross into the centre was met by Aguero whose first effort was saved by Lindegaard, before the Argentine made no mistake in scoring from the rebound.
City pushed for an equaliser in the final 10 minutes and were also denied a penalty after the ball hit Phil Jones' hand inside the United area, while Kolarov's injury time free kick was parried by Lindegaard as the Red Devils held on to progress.