For that purpose I've been using a different Russian layout, called "Russian (with Ukrainian-Belorussian layout)"; in Cinnamon's keyboard settings I had to tick a checkbox that shows less common layouts in the layout selection, but I'm confident those are also available on other DEs like KDE. That layout is mostly the same apart from some symbols, and you can make accents pressing Alt Gr + ё (well, the key that would produce ë on the standard layout) after the letter that you want to have an accent. (Normal ë is then done by pressing Alt Gr + e)
I only need accents when I add vocabulary in Anki, so I have both the standard layout and the Ukrainian-Belorussian layout in my list and switch between them according to my needs.