Is there a way to stop receiving iMessages on OS X when the Messages application is closed?
Yes, you can achieve your desired behavior without disabling Messages on your Mac.
If you turn off notifications for Messages from within System Preferences, you will still receive the messages, but will not be notified that they came in.
You can turn notifications off on the following screen. Simply click on "None", and deselect all the checkboxes, as illustrated below:
There is no way to leave it on but not receive the messages.
The only real way is to Disable the account (untick "Enable this Account") in the Messages Menu > Preferences > Accounts.