Anything is possible, even if it is unlikely, and this has certainly happened and resulted in pregnancy. There is a higher chance of this happening if you have irregular menstrual cycles or short cycles (day one is the first day of bleeding and the cycle end is defined as the day before you get the next day one of bleeding in the next cycle).
There are 14 days* from ovulation (when the egg pops out of the ovary and lives for about 24 hours) to menstruation - this is the luteal phase, and this is usually very constant. The beginning of the cycle, the follicular phase, however (from menses to ovulation) can vary widely, and in a 21 day menstrual cycle, ovulation can occur on day 7. Sperm can live 48 to 72 hours, which means in this cycle, if the woman had sex on day 4 of her period, the sperm could still be around on day 7 and she could get pregnant. The normal period length varies from 3 to 8 days, so you can easily see where you can get pregnant if you have short or irregular cycles (even if you don't, remember, you can always have an off month.)
Nothing is foolproof, so birth control is always recommended so you don't have to deal with the consequences of an unplanned pregnancy.
*Some women's luteal phase may be shorter (e.g. 12 days) or longer (e.g. 15 days), but for each woman whose cycles are generally regular, her luteal phase will usually be very constant.