Pills that’s affect birth control

So I came down with a sickness and the doctor told me that the pill was taking was going to make the pill less affective and I need a backup method to protect myself. I had sex without a condom (just the pill) the other night, I know sperm can live up to a few days, does this mean I could become pregnant?