Will restoring my iphone require me to upgrade versions?
My personal recommendation would be to jailbreak your iPhone and download a Cydia application called iCleaner, which is specifically-intended to free up space on your device by clearing junk files.  It even has the exact option that you seem to be  looking for -- to delete message attachments.  It has multiple options for this -- to delete ALL message attachments, or SMART (which I'm not 100% certain what this does, but you could look into it).  iCleaner is pretty much the equivalent of CCleaner for iOS.

I do know for a fact that all messages and attachments are stored in a SQLite database that requires root access.  Your Messages application only shows the previous [however many] messages from individual contacts, but you can see that you can go back to previous history by scrolling all the way to the top and refreshing (swiping down).  Many people don't realize that  if they keep their messages, they are taking up valuable storage space on their phone, because this includes all attachments (including photos, video, etc.).

The following is only speculation, but my assumption is that iCleaner's SMART option only deletes the old attachments that are not currently visible in your current message history -- the old stuff that is still contained in the database, but which you don't have access to unless you scroll all the way up and refresh (by swiping down) to see older messages.

To answer your specific question, if you have done a full backup to iTunes rather than iCloud, you would be able to restore your phone to exactly that previous state, including iOS version and would avoid having to upgrade.