You can exit the country but the loan has to be either settled or the bank will ask you to give you home country bank details and you will have to pay from your home country bank