Interesting question I've considered too.
If you jerk-off with a buddy, is that cheating?
When does it become cheating?
As mentioned, I think it comes down to the boundaries of the relationship. If you know that she would not approve and would view it as cheating, then it is. There's no definitive and universal criteria, so you have to base these things on your own relationship.
Many people would consider a guy having a jerk-off buddy as cheating, but if you're not touching each other, why is it considered so? If you're not remotely interested in leaving your partner for them, how is it anything to worry about? And if it is something to worry about, where do women stand on guys getting their dick out beside a mate at the urinals, or being naked in a locker room together? If it's about intimacy, does that mean women feel threatened by their guys having close male friends?
It's all very confusing and complex, but fascinating too. At least to me.
Thankfully my best mate has a great partner who doesn't see anything wrong with two guys beating off to some porn together.
My idea of cheating is having physical sexual interaction with another when such a thing hasn't been agreed between the partners. But there should be no doubt that if you're in a committed relationship, it's only decent to at least discuss these things BEFORE conveniently deciding that it's fine with them