Can I power something directly from an IC, for example a little relay?
If Relay0 is a reed relay, then it might work.  Reed relays are available with coils that only draw a few milliamperes.
You'll need to look at the datasheet of your XOR IC, find out how much current it can deliver, then find a reed relay that can operate on that current and the supply voltage of your IC.
The more typical way to do this is to use a single transistor from the output of the XOR to drive the coils of your relays.
This circuit shows how to drive a motor safely from a digital IC:

The original answer I borrowed that from explains the details.
You can use the same circuit to drive your relay.

Regardless of which circuit you use, you need the diode as shown across the motor.  Turning off a motor or relay coil causes high voltage spikes that can kill your processor, digital IC, or transistor.