I believe there would be quite a few things precluding Gretzky from being drafted out of the blue.
#1, Wayne would first have to declare himself eligible. However, even if he wanted to, he would be disqualified due to...
#2, his age. Since he is over 21 and has played at least one game in North America, he is ineligible to be drafted. That's why all of the 'overagers' you see in the draft are Euros. He'd technically be classified as a free agent, but couldn't sign with the Caps because of...
#3, his stake in the Coyotes. As long as Lemieux owned the Penguins, Bettman has said that he can play for no other team. The same would hold for Gretzky.
For the entire CBA text, visit...
http://letsgopens.com/nhl_cba.php?id=8
"8.4 Eligibility for Claim" is the relevant section.