Yes, it is possible for you to sell the property even while it is under mortgage with the bank. The amount received can be used to pay off/foreclose the loan. There might become charges or penalties associated with pre-payment though.