Superconductors can do this well. They conduct electrically nearly perfectly (too much magnetic field strength will make them poorly conducting normal materials). When well cooled on their temperature scale their thermal conductivity drops to very low values so no heat is generated by flowing current. But, if the magnetic field in which the material is immersed is too strong the material stops being a lousy thermal conductor and conducts well, because the superconductivity is turned off and the behavior is that for well conducting metals at the temperature of the device made from the metal. The electrical conductivity also is that for a non-superconducting sample of that metal.
Devices to switch thermal conductivity on and off at will are common for low temperature research and get the obvious name “heat switch”.