It’s a little obscure, but if you tap on the person who sent you the message (the icon at the top of the message) it should bring up a panel that has an “Info” button on it.
Touching Info will bring up their contact pane which should have a tiny gray “recent” badge next to one of their phone numbers (or email in the case of Messages). That would be the phone number used to send you that message.