The winners of Tuesday's match at Pride Park secured a home tie against United in the fifth round, with the matches to take place in midweek between March 3 and 5, with no replays.
A reunion between Rooney and the team with whom he became a superstar will now go ahead, with the 34-year-old former England frontman netting a 77th-minute penalty in the win over League Two side Northampton.
After joining United from Everton in 2004, Rooney went on to become the club's record goalscorer, netting 253 times in 559 appearances.
Rooney left Old Trafford in 2017, returning to Everton, where he spent one season before moving to MLS side DC United.
Derby confirmed Rooney's signing last year, with the former England captain officially joining in January. He has scored three goals from eight appearances for the Rams in all competitions.