A mathematical model of the process of heat diffusion in a closed metal wire is considered. This wire is wrapped around a thin sheet of insulation material. We assume that the insulation is slightly permeable. Because of this, the temperature at the point of the wire on one side of the insulation influences the diffusion process in the wire on the other side of the insulation. Thus, the standard heat equation will change and an extra term with involution will be added. When modeling of this process there arises an initial-boundary value problem for a one-dimensional heat equation with involution and with a boundary condition of periodic type with respect to a spatial variable. We prove the well-posedness of the formulated problem in the class of strong generalized solutions. The use of the method of separation of variables leads to a spectral problem for an ordinary differential operator with involution at the highest derivative. All eigenfunctions of the problem are constructed. In the case when all eigenvalues of the problem are simple, the system of eigenfunctions does not form an unconditional basis. A criterion when this spectral problem can have an infinite number of multiple eigenvalues is proved. Corresponding root subspaces consist of one eigenfunction and one associated function. We prove that the system of root functions forms an unconditional basis and can be used for constructing a solution of the heat conduction problem by the method of separation of variables. We also consider an inverse problem. This is the problem on restoring (simultaneously with solving) of an unknown stationary source of external influence with respect to an additionally known final state. The existence of a unique solution of this inverse problem and its stability with respect to initial and final data are proved.