Anal masturbation shouldn’t hurt if it’s done right. If you take your time, be gentle, and use lots of lube, you should be fine.