I'm on the pill but when I had a trans vaginal ultra sound looking for cysts... My doctor said I recently released an egg. Can I become pregnant?

Yes. Any women who is ovulating has the potential to become pregnant, the fact that you released an egg means that you are ovulating and could get pregnant if you have sex in the 3-4 days prior to or 1-2 days following ovulation day.
Possibly. If you have recently ovulated you may become pregnant. This can happen if you miss one or more of your pills during a cycle.