Chafing has its good and its bad points. The bad is that the friction burns are usually over a "hot spot", will scab over, and heal in due course. The good point is that because they are over a hot spot, the pain of rubbing them the next few times you masturbate might cause the scab(s) to detach, yet because there is a fine line between pain and pleasure, the discomfort is actually quite pleasurable once you have become very highly aroused.
Next time, try and back off rubbing the hotspots, and/or make sure that the lube if you are using any does NOT dry up. Keep it wet either by adding more or using water or saliva to reconstitute it.
Here is an article that discusses the fine line of pain and pleasure from another activity:
"Playing Ball" and How To Tips for Prostate Massage
This is also an excellent tutorial for people interested in and concerned about the how-to of Anal stimulation as well as play.
Just let the wound(s) heal normally.