No, you have to pay all your liabilities and cancel your residency in Qatar, before you leave and yes it will effect your residency process in other GCC countries, as these liabilities will hunt you for the rest of your life in GCC.