If you honestly feel that bad about it then I'd just straight up tell her. It wouldn't be right to keep secrets in a relationship, especially if they're constantly making you feel awful. Considering her attitudes towards you masturbating in general than I'm sure she'll be understanding.
If you feel like you aren't comfortable masturbating at all then don't. But if you feel like it just makes you unloyal or unfaithful to her than just talk it through. You'll feel a lot better after expressing yourself to her.
xoxo