Yes, the transfer of heat is possible in the absence of an intervening medium.
Radiation is the mode of heat transfer through which heat can be transferred with or without any intermediate medium.
Similar to light, heat transfer through radiation can take place even in vacuum.
Maximum region between the Sun and the earth is vacuum (without any medium). Still, heat reaches us through radiation.