It’s up to the school district. Some require you to reside in the district in which you attend school, while others do not. That ruling is enforced by the TEA and other governing bodies; therefore, my “Not always...” comment is correct.
From the TEA website:
Can my child attend school in District A, even though we live in District B?
Generally, a child must attend the school district in which he or she resides. School districts can make transfer agreements to accept each others' students. Transfer arrangements may also result from wealth-sharing arrangements under Chapter 41 of the Texas Education Code. For more information, contact your school district or the TEA Division of State Funding at (512) 463-9238.
Some campuses won’t allow it while others will. It’s their choice.