I couldn't find anything useful on the Internet, although I did find somebody asking exactly the same question, so I know I was not the only one. I finally managed to solve the problem, so I'm writing this down to help anybody who could be looking for the solution.
I went to "Settings" - "switch accounts" and I switched to my Google account. Then I switched back to Evernote account. This wiped out the problematic notes, but it's OK, I wanted to delete them anyway. The rest of the notes, which had been backed up to Evernote, were preserved. I wrote a short test note and then deleted it without any problems, so it seems the problem is fixed.