Unless the lease allows it, a tenant may not sublet (rent the house or apartment to another person) without the consent of the landlord. Section 91.005, Property Code.  If a tenant sublets without the consent of the landlord, the landlord may evict the subtenant and sue both the subtenant and the original tenant for any damages caused by the subletting arrangement.

Landlords do not like subletting in general because you are making the decision on who occupies the premises instead of them.  Landlords often make careful decisions about who they want residing on their properties.

If the lease does permit you to sublet your place, subletting is still complicated. Unless the subletter (the person renting from you) and the landlord sign a lease agreement with each other, you will become the landlord of the new tenant. For example, your subtenant will have to request repairs to the apartment from you. You will then have to request the repairs from your landlord. Moreover, you remain liable to your landlord for the rent. So, if your subtenant stops paying rent, you will have to pay rent to your landlord and attempt to seek reimbursement from your subtenant. 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 attempt 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 avoid the undesirable situation where you are stuck in the middle between your landlord and your subtenant.