Sure you can withdraw the amount. However,
1) is the loan from the same bank, in which case your company will inform the bank that you have been terminated and they will hold all money in the account till the loan is settled.
2) Travel, sure as there is no exit required for certain categories, however, if the bank amount is not settled they will put a case. In which case you are stuck.
3) Also, banks have taken your PP & QID copy and find all details of home country so they can raise a case in home country.

Unless rules have changed.
All the best.