It's not possessive for you to respect yourself and for her to respect your relationship. You can tell her to stop allowing your relationship to be disrespected or there won't be a relationship. I'd tell her she needs to completely cut M out of her life. Personally, I'd confront M myself as well and make it clear if he comes near her again he's getting stone cold stunnered.