Hi and thanks for the query,
Having a pregnancy
just before the onset of a period is actually a rare situation, but can be observed in few persons, especially women with irregular periods
. It is important to note that pulling out of the penis before ejaculation, other wise called the withdrawal method as a birth control strategy is very INEFFICIENT and unreliable.
Its normal to observe some changes in bleeding patterns with birth control pills. It is actually not very probable that it should be a pregnancy, the possibility is low but present. I still suggest you book a pregnancy test and do it. Using other effective methods of birth control like condoms, pills and abstinence in future could be very advisable. You might book an appointment with your gynecologist to discuss the various options with you.
thanks and hope this helps,