Subleasing
Unless the lease says you can, a tenant may not sublet (rent the rental property to another person) unless their landlord says it’s OK. Section 91.005, Texas Property Code. If a tenant sublets without the consent of the landlord, the landlord may evict the subtenant and sue the original tenant for any damages, such as the cost of evicting the subtenant, or damages caused by the subtenant, during the subletting arrangement.
Many landlords do not like subletting in general because you are making the decision on who lives in their property instead of them. If the lease does permit you to sublet your place, subletting is still complicated. Unless the subtenant (the person renting from you) and the landlord sign a lease agreement with each other, you will become the landlord of the new tenant.
Example: your subtenant will have to request repairs to the apartment from you. You will then have to request the repairs from your landlord. Meanwhile, you will still have to make sure your landlord gets paid for rent, even if your your subtenant stops paying. You will also be liable to your landlord for any damage done by your subtenant.
If you must move out of your apartment, you should try to get your landlord and the person moving into your apartment to agree to a lease between each other. You should have your landlord release you in writing from any further liability under your lease. This will help you avoid being stuck in the middle between your landlord and your subtenant.