Sheikh M. S. Al-Munajjid, a prominent Saudi Muslim lecturer and author, states the following: The idea that is common among some people that a gift cannot be given away or sold is not correct and is contrary to the Shari`ah. The person who takes possession of a gift in a manner that is acceptable according to the Shari`ah has the right to dispose of it by selling it, renting it out, giving it away, or donating it as a waqf, and there is nothing wrong with doing that. Whoever regards any of that as not allowed is not right. There is evidence to that effect in the Sunnah of the Prophet (peace and blessings be upon him).

It was narrated that `Abdullah Ibn `Umar said: `Umar took a jubbah of silk that was being sold in the marketplace and brought it to the Messenger of Allah (peace and blessings of Allah be upon him) and said, “O Messenger of Allah, buy this and adorn yourself with it for the `Eid and when the delegations come.” The Messenger of Allah (peace and blessings of Allah be upon him) said to him, “This is the clothing of one who has no share in the Hereafter.” As much time passed as Allah willed, then the Messenger of Allah (peace and blessings of Allah be upon him) sent to `Umar a jubbah made of silk brocade. `Umar took it and brought it to the Messenger of Allah (peace and blessings of Allah be upon him) and said, “O Messenger of Allah, you said that this is the clothing of one who has no share in the Hereafter, then you sent this jubbah to me!” The Messenger of Allah (peace and blessings of Allah be upon him) said to him: “Sell it or make some use of it” (Al-Bukhari 906; Muslim 2068).
The above hadith shows that it is permissible to sell a gift, as the Prophet (peace and blessings of Allah be upon him) told `Umar to sell the gift that he had given him.
It was also narrated that Ibn `Umar (may Allah be pleased with him) said: We were with the Prophet (peace and blessings be upon him) on a journey, and I was riding a difficult camel that belonged to `Umar. It got the better of me and went ahead of the people, and `Umar rebuked it and sent it back. Then it went ahead again, and `Umar rebuked it and sent it back. The Prophet (peace and blessings be upon him) said to `Umar, “Sell it to me.” He said, “It is yours, Messenger of Allah.” He said, “Sell it to me.” So he sold it to the Messenger of Allah (peace and blessings be upon him) and the Prophet (peace and blessings be upon him) said, “It is yours, `Abdullah ibn `Umar; do with it what you wish” (Al-Bukhari 2010).
This saying of the Prophet (peace and blessings be upon him) to `Abdullah Ibn `Umar indicates that whoever is given something becomes its owner and he may dispose of it however he wishes, by selling it, giving it away, or otherwise.