An ICE is not an ideal heat engine. But if you did have an ideal heat engine, it could either produce work by reducing a temperature difference, or increase a temperature difference when provided with work. No physical device can do better than an ideal heat engine.