Messier was officially introduced Wednesday during a news conference at the Hockey Hall of Fame. He is a special assistant to New York Rangers president Glen Sather.
Fellow Hall of Famers Steve Yzerman and Gretzky have built Canadian teams in recent years, and when Messier was asked whether Gretzky would be considered to coach the team in Germany, Messier replied: "Yeah, for sure."
There was no immediate word on whether Gretzky is interested in the position. He's been out of hockey since stepping down as coach of the Phoenix Coyotes in September.
Hockey Canada president Bob Nicholson has had discussions with Gretzky, but wouldn't speculate about whether he'll join the world championship team.
"Wayne's been so good to Hockey Canada," Nicholson said. "I'm not sure if Wayne will be there. I hope Wayne will be involved with Hockey Canada down the road. When it's right, I'm sure Wayne will be back with [us]."
Gretzky and Messier won four Stanley Cups together with the Edmonton Oilers in the 1980s and were also teammates for a season in New York.
"I'm not doing it to advance my own career," Messier said of his new job. "I'm doing it solely for the opportunity and the challenge to do something special for Hockey Canada."
Even if the men don't end up working together in May, they will almost certainly speak before the tournament. Gretzky was GM of the 2001 world championship team.
Canada has appeared in the world championship final six times since 2003, winning three gold medals. It had to settle for silver the past two years after losing to Russia by one goal in consecutive gold-medal games.
"It has been challenging for Canadians to go over there and win," Messier said.