How can I prevent my IR sensor from sensing the sunlight?
I'd like to expand on analogsystemsrf's answer a bit:

Thus pulses, or squarewaves, of photons may be your best bet.

Exactly.
Sunlight doesn't change quickly.
If your illuminating IR LED is pulsed on/off, e.g. at 25 kHz (easy with a microcontroller), then you can simply measure the photocurrent at every pulse:
Add all measurements when the LED is on, subtract all measurements where the LED is off.
When you write that down, you'll see that you're simply subtracting the background light, which stays constant.