Powering ir led with a 9V battery
Yes, you can but you have a few problems. A 9 V battery will discharge quickly when continuously driving the infra-red LED. And making electrical connections to a 9 V battery requires a snap-on battery connector. 

Soldering is the only reliable way to connect the LEDtransmitter + resistor to the battery snap-on connector. But if you insist on proceeding, here's the circuit:



simulate this circuit &ndash; Schematic created using CircuitLab
An alternative circuit is shown, using two batteries in series (1.5 V each) that will last somewhat longer, yet still provide similar light intensity. Note that the 180 ohm resistor is contained inside the transmitter module. I'm guessing the internal circuit, since ADAfruit don't provide details.
Since the light beam expands as it travels further, you may find that detecting the beam across a doorway may be difficult, and will require larger current from the battery (too much for the LED to dissipate).
&quot;Electrical tape&quot; is used because of its protective insulating properties, not because it promotes electrical contact. It should not be used to secure a wrapped connection - reliability is not assured. Soldering or crimping is more reliable.