Which Messenger app are you using? Facebook Messenger would continue to work on Wi-Fi, even if the phone is not activated. It’s not tied to your phone service.
If you’re referring to the stock text messaging app or Google Messages and it is sending text messages from your phone number, that will probably fix itself once the phone syncs with our servers again. If it persists, and concerns you, you may be able to speed up the necessary housekeeping by launching the dialer as if you were going to make a call, bringing up the numeric keypad, and dialing
*#*#8647#*#* with the phone on Wi-Fi.