I’ve been playing around with the source and destination layer modes, but they don’t seem to be meant for what I want to do.
The lock layer option is good, but it only works on the same layer. In Photoshop or Krita I would have created a selection from one layer, moved to the next layer and started painting.
Is it possible to do something like that in MyPaint?
Sort of. Try the Source Atop layer mode within a group. Here’s a red squiggle overpaint on a yellow-green fuzzy mask:
You can use Destination In instead if you don’t want to see the mask.
If you want to merge the result, [beware of background subtraction artefacts] (https://github.com/mypaint/mypaint/wiki/v1.2-Layer-Merging-and-Normalization)! Basically, the only safe way to merge that group is to turn off the backdrop (background and any underlying layers).
When I tried I only managed to erase the mask layer with the layer on top.
That is a rather open ended question. Can you be more specific?