DCC is a high frequency variant of an AC sine wave. As long as you have the proper resistor installed based on the track voltage, either bulbs or LEDs will run off it just fine.
I have a couple signal towers located at the double gapped sections of a reverse loop (DCC). The red LED is connected to the same rail on either side of the insulated joiner and the green is connected to opposite rails. If the main and loop polarity (phase actually) don't match, the red LED illuminates, if the main and loop do match, the green LED illuminates .... both connected through a resistor straight to track power.
Connecting lighting in your engine would be the same thing. As said already however, you won't be able to turn them on / off.
Mark.