While this is certainly unlikely, it would not be the first time that someone got pregnant with a story like that. A doctor
can administer a definitive pregnancy test, so I recommend booking an appointment right away.
In general, there are some materials that are designed to protect those wearing them from pregnancy. While clothing seems like a good idea (and it would be very difficult to become pregnant with a story exactly like you have described), the only materials tested to prevent pregnancy are those that are used to make condoms. If you are about to have sexual intercourse, it would be important to use protection. Whether you "go all the way" or not, taking the extra step to protect is part of safe sex practices for you and for her. If, however, your girlfriend is pregnant and you have only had this level of interaction with her, it might be worth doing some studies to confirm the father of the child. Again, if the story is as clear cut as you describe there is a very low risk of pregnancy (some might even feel this is nearly impossible).
If you have questions about safe sex practices or this specific occasion even, please speak with your doctor who will be able to answer your questions.