You could use a bridge rectifier to convert the engine's AC motor to DC, and then use a DCC system and decoders designed for O two-rail use. Might be easier to go with the Lionel system.
You might get better info if you also posted this in the Classic Toy Trains forum.
The DCC signal is a square wave AC command signal combined with the DC track power. Decoders will not work with AC power because they are digital devices, which require DC. I think Lionel makes a command control system that works with AC power, but it is not DCC as defined by the NMRA, and NMRA compliant decoders will not work with it.
Electronically the chips run on DC. I have read that DCC systems put out 16 to 24 AC to the track. This is so a decoder can activate an AC accessory. O scale just has larger power supplies to operate the larger motors (amps). Whatever system you have you have to install the decoder per manufacturer's instruction. If a decoder runs off the track it has a bridge rectifier and power amplifier to convert AC to specific DC voltage to run the circuitry.
Lionel Legacy does have a converter to run standard engines to activate e units. I don't know any details.
July Issue classic toy trains