Yes, there is a possibility of that happening again. Regarding the part of the foreskin that tore, was it the frenulum, the small web of foreskin that attaches to the underside of the penis? This is the commonest part of the foreskin to tear.
My advice to prevent this from happening again would be:
1. Avoid sex / masturbation that is overly vigorous. Every guy's penis is different, and needs to be treated in a way that does not cause it pain and discomfort, and gives maximum pleasure :-)
2. Don't pull the foreskin back all the way, or at all, when you have sex / masturbate. This will prevent your frenulum from stretching beyond its ability to stay in one piece.
3. You could attempt to stretch the frenulum over time, by applying increasing force when you masturbate. Pulling back the foreskin harder each time can allow the frenulum to stretch. In saying this, you do run the risk of causing a tear.
The choice is yours. Enjoy it!
I am a doctor :-)