For IMAP, you can export messages, move them to trash (and then empty trash) and then import the exported messages into a local POP account via the "Menu -> settings -> import and export -> import mail -> import generic mbox" wizard.
The first time you import, you'll create a new pop account (a local one that doesn't connect to anything). After that, you'll import into that already-created pop account.
On the General tab in that POP account's settings, you can rename the account to what you want ("Archive" for example).
You can then, if you want, right-click in the mail panel and make use of "show messages from" to only show messages from a certain account at a time so you don't see the archived messages all the time. Or, you can create a label named "Archive" and set "hide these messages from other views" in its properties. Then, you can add all messages in that local POP account to the label so that they're treated as hidden where they won't show in other views.
That's basically the only way you can remove a message from the IMAP server and keep it in Opera. IMAP is like webmail where what you do in the client is what happens on the server. As said, the "leave messages on server" option is only for POP accounts.