A note to those still having a similar problem. I had this problem with a particular email account on all my devices, once of which had iOS7 and another iOS8. Couldn't delete messages as described in the original question. The problem turned out to be that the Apple mail tries to move the deleted messages to the local Trash folder by default, and my email account didn't like that. So I changed the settings to move deleted messages to a Trash folder on the server, and that fixed the problem.
To change the settings, go to "Settings" on your device, then click "Mail, Contacts, Calendar", select, the problematic mail account, click on it, then click on the name of the account again until you get to the screen "Account", which shows all the server settings. Scroll down, click on "Advanced". Once there, click on "Deleted Mailbox" and select a destination folder on the server (e.g., Trash), and NOT the Trash folder on your device.