Hi OP,
what was he masturbating to? Depending on whether it was porn, pictures of you or him using his imagination my thought process would be different on all 3.
However, having had ED myself, I can tell you without hesitation that sometimes I found sorting myself out was easier both mentally and physically than sex/intimacy for fear of disappoint for both parties and feeling like a let down.
It really depends on how active/good your sex life is with his ED, and whether or not you are both satisfied.
How do you react if/when he can’t get a proper erection for PIV?
I think a lot of women under estimate the mental impact ED has on a man, certainly for me, as a man in my early 30’s it was soul destroying and I was in a very dark place.
Is he doing anything about his ED? Has he seen a urologist, does he use PDE5’s like Viagra or cialis?
It’s very unlikely that it is him rejecting you, more likely embarrassment on his part , if he does it again even though you have told him how it makes you feel then that’s a whole new issue.