Can you get pregnant when you're not ovulating?

This is out of curiosity, but does anyone know if you can have unprotected sex a week before you ovulate and not get pregnant.