He might have the right to decline your offer to transfer the contract to your friend, but I think under the Qatari law, there is a diplomacy clause that gives you the right to break the contract if you are leaving the country for good; I think you give one month notice and pay one month penalty. Ask someone in your HR department.
Hope this helps...