That's not how it works.
There's no automatic trade exception for players retiring; in Sheed's case, some suggested trading him to either get an asset or trade exception in return.
Additionally, Pierce wouldn't be able to return for a year. At that time, I think the contract he has in effect would be reinstated (meaning if he came back in 2012-13, we'd owe him that contract value).
If we bought him out (like we did with Rasheed), he wouldn't be able to come back until his original contract was up (2013-14).