Temperature difference is caused by heat. A heat engine converts heat into mechanical work. A Carnot heat engine is an idealized form of heat engine vs say a Diesel heat engine.
You can most certainly convert heat into something else. It's called the law of conservation of energy, not heat, which is just one form of energy.
But the limits to these transformations are governed by the 2nd law of thermodynamics, not the first. You can't arbitrarily convert heat into other forms of energy.
E.g., if your machine relies on all energy in my room to spontaneously gather in my coffee mug to heat it up, while simultaneously cooling my warm room, this would be perfectly fine with conservation of energy and super useful. Unfortunately, it would also violate the 2nd law and it's thus something that doesn't happen in our universe.
You can most certainly convert heat into something else. It's called the law of conservation of energy, not heat, which is just one form of energy.