Rooney was omitted from the Manchester United line-up against Real Madrid on Tuesday, sparking frenzied speculation about his future at Old Trafford.
While Gareth Bale is among the most in-demand players in Europe after scoring 24 goals for club and country so far this season.
And Messi admits he would welcome the chance to play in the same team as either player in the future.
"Wayne Rooney and Gareth Bale are both great players, they are doing so well for their clubs," the 25-year-old Argentine forward told the Daily Mail.
"And I always want to play with the best players.
"I have to be careful what I say because I can't see them leaving their teams soon.
"But, of course, I want to play with the best players."