Yep. Penpot allows creating masks. Masking an image means limiting where a certain layer or adjustment is visible. Check this video to learn how to mask layers!
You will find more specific info on masking layers in the user guide: 04· Layer basics
Do you have any example #MadeWithPenpot? Don´t be shy… Share it!