9 days since hydrocele surgery. I think I'm having a speedy recovery. Very minimal discomfort. Can I masturbate? Don't want to ruin surgery.

Hard to ruin. It would be hard to ruin that surgery. The worst that could happen would be that your scrotum would swell up again. Knock yourself out.
Congratulate... .. you for, thus far, a smooth recovery after hydrocelectomy. Now, 9 days out, and you may be ready to go if not overly hurting at shaking the surgical site. So, let common sense guide you for safety and comfort. Best wish to health...