Yes, heat is a conserved quantity. Suppose two bodies A and B are at different temperatures, wherein A is higher and B is lower. When they are brought in contact, the heat given by A is equal to the heat gained by B. Thus, the heat is conserved in the system.Here, we have ignored the heat exchanged with the surroundings. If we consider the surroundings, the heat of the system will be conserved.