The Red Devils have reportedly rejected a bid from rivals Chelsea for the England international, who was said to be "angry and confused" by comments from new manager David Moyes that suggested he would have to be the Dutchman's back-up next season.
"If I was Wayne I would be very confused too," McIlroy, a United fan, told a press conference at Muirfield, where the two-time major winner is gearing up for the start of the British Open on Thursday.
"He's had nine great seasons at Man United, and reading between the lines of what's being said, I don't think he needs to prove himself to anyone. I don't think he needs to prove himself to the new manager.
"I don't think he should be playing second fiddle to Van Persie. He's been a great player and a very loyal player for Man United."
McIlroy hopes Rooney would stay at Old Trafford, but said he would understand if the 27-year-old wants to move on if he doesn't start matches.
"I guess he just wants to play football," said the Irishman. "I think he's that sort of player. He just wants to get on the pitch and show what he can do.
"If he doesn't feel he can do that at United, he'll obviously want to go elsewhere. And I think that's very understandable."