Probably OK, but if you can't get onto some reliable birth control, you are likely to end up being not OK. Why do you keep letting him do this?
I agree from Annie and also am pretty firm myself that getting pregnant from rubbing a penis near you is unlikely to impregnate you. Penis really needs to enter your vagina. But you are getting close to sex so need to get some condoms to be ready. Don't over think it. And anxious people being sexually active have a harder time. If every event will cause you to cascade into a spiral of anxiety, might not be a good thing to get into right now until the consequences of sex are not as disastrous to your life should it not go the way you want. Otherwise, get on birth control and use condoms. That's the best way. But this sounds like nothing related to pregnancy.
The answer is yes. Spermatozoa swim quickly into the fluids, even before complete ejaculation. This is nothing to fool around with. The penis does not need to enter the vagina. Talk to your OB-GYN! and please, I hope you will wait until marriage. I made so many mistakes in life and know how valuable you are. look up article on sex before marriage and the impact it can have both mentally and physically. You are a beautiful and wonderful person who should always be respected, valued and loved with real love! Look it all up. God bless you.