If I was Canada's GM, I would have found a way to fit him in if he was still playing in the NHL. I imagine his talent and skills could still contribute to something like a second power play unit. And though I'm not a big Gretzky fan, I think just having him there would itself make a difference. Canada can bring a stacked team to any tournament talent-wise, but Gretzky would have brought an extra dimension - for the loss of just one spot.
I would certainly have asked him to play for the team. However, if he flatly refused to play (which I don't think he would if called on by his country), then I would respect his decision. To me it's one of those things where you as a GM have to realize that Gretzky is bigger than hockey, bigger than one international tournament, but probably about as big as the Olympics itself, so he should be there. It would be his very last go around, and should be enjoyed by all.
I think that 1998 Canadian Olympic team losing to Finland in the Bronze Medal Game was another stain on people's memories. People were anticipating at least some type of medal victory for Canada.
Gretzky did assist on the 2nd (and last) goal scored by Canada in that game, a PP goal by Brendan Shanahan,