Illegal to Unlock iPhone on AT&T for Use in Canada?

My cousin is going to send me his old iPhone 4 here to Canada for my sister to use but he said it's locked to AT&T. He went a store to try and get it unlocked and they told him it's actually illegal. Here's what he dm'd me:

Hey. Just went to AT&T. They said they can't unlock my iPhone 4 because its illegal.

However they said I should just ship it to you and you guys tell your service to unlock it.

So ask Rogers or Bell or whoever you have if they can unlock an American iPhone 4 with no problem. Let me know then I'll ship it ASAP Thanks

Is this actually true or are the people at AT&T just ignorant?