The simple answer is yes, you can sell a property with a tenant still living in it. In fact, the laws in most, if not all, U.S. jurisdictions give the tenant the right to remain in the property for the term of the lease, continuing on after the sale if the tenant's lease remains in force.