You are well within your rights to sell the property whilst it is currently leased, however it is crucial that any potential buyer is advised that there is currently a lease in place. This must be included as a special condition to any offer & acceptance. The buyer must be fully aware that the property will not be sold with vacant possession.
The tenant has the right to continue to occupy the property until the end of the lease agreement. However if all parties negotiate and agree they may terminate the existing lease agreement. Having tenants in a property that take great care, and are reliable may appeal to prospective investors.