i think it works with Wi-Fi but someone told me that you can also still have LTE data even if the phone plan is off when the bill is not paid. please advise
No, texting is 2G, the same as voice. You can use wifi texting apps, but the person receiving the text has to be running the same app. Actual texting - SMS - has to have a working account. You can use an email-to-text gateway (Email-to-SMS Gateways), and the person receiving the text can email you back.
(Whoever told you that you can still have LTE when the account is turned off is living in another universe.)