Short answer, "Yes."
As usual, the devil is in the details.
Gain the cooperation of the tenant prior to listing. Offer some free rent after contract, etc, to get the tenant on board. If your tenant is not cooperative, your listing showings and sales will not be smooth.
Tenants often refuse showings, particularly if they do not want to move out.
And they may not keep the house up, so it will not show well.
At worst, they may stay for showings and make it a point to show all the bad points of the house to scuttle a sale.
So, before proceeding, have a plan to get the tenant on board.
Be ready to deliver a vacant home at closing, i.e,, unless it is being sold for investment potential, and the new owner desires a tenant, no one wants to inherit a tenant in place.
Keep in mind basic fairness. It IS the tenant's residence, and their tenancy and rent payment offers them a right of quiet enjoyment of the premises.
At minimum, you want buyers to give a full 24 hour notice, without exception, out of respect for the tenant.
But, with all that in mind, Yes, you can list your home for sale, and can sell it.
Good luck. Feel free to call me any time, though it looks like you have a lot of help here.
If you would like to list your town home for sale and their are current tenants in the home, you would need to present some sort of lease or agreement that will allow whoever purchases the home the right to actually move into the home once they close. The best way is to present the tenants with a month-to-month lease that will allow both parties to give a 30-day notice. I am more than happy to answer any of your other questions about getting you started!