If the rails are the only sources of power, whether intended or in reality, and the rails are tested as having the right power to each of them, then an HO scale engine on HO track should work. Otherwise, you have continuity problems or problems with the engine. Engine problems can be broken solders to the motor, dirty wipers, broken and jammed gears in the drive mechanism.
Is this DCC or straight DC?
-Crandell