Hi,
If the Apple ID is not logged in but is using the iPhone Number on the Mac to Receive at least it is possible that the link with the iPhone number will stay live to allow SMS to work.
All this needs is that at some point the iPhone Number and Apple ID were linked for SMS and then that the two devices on your LAN are still using the Apple ID for the SMS info to be forwarded to the Mac.
The reverse can happen on the iPhone whereby the Number gets deselected (not a User choice but know to happen now and then).
If the Apple ID is still a Receive and Send option then the iMessages get through via the "sync" copies.
The active link tends to be time limited when on device goes Off line.
The Users Tip details things you can try before phone Apple Support and moving up the chain until someone high enough can look at the server and say if your Apple ID use from your Mac is blocked.
The Serial Number makes it Device Specific and it also leaves other apps unaffected.

8:19 pm Saturday; September 30, 2017
iMac 2.5Ghz i5 2011 (Sierra)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
iPhone 6 iOS 10.x and an iPad (2)