A resistor and a diode will do the trick if you want to power it from the motor. Since the polarity of the motor power is dependent on the direction of travel, you can wire it so it's only on when moving in reverse.
A question. Is this a PS/1, PS/2, or PS/3 locomotive? If so, there is already a feed for a reverse light.