LOTS of dealers in Texas have used Rivians with low miles often for pretty reasonable prices. In my experience, you'll find a great used selection at the pre-owned division of luxury German franchise dealers.
For lemon law generally, the manufacturer gives you a check for the purchase price of the vehicle minus mileage and wear and tear. You would be responsible for paying off any loans with that check. Since you're on a lease, the process might be a little different - they could just pay the lease...