The solid is assumed to be a rigid body. Friction causes rotation and does do rotational work with respect to the center of mass. But, for no slipping of a rigid body, the net work from friction is zero because the decrease in translational kinetic energy of the center of mass due to friction is exactly matched by the increase in rotational energy with respect to the center of mass due to friction. Said another way, the net work from friction is zero because the point where friction acts is instantaneously at rest in the inertial frame of reference. For a detailed discussion of both of these reasons see Consistent Approach for Calculating Work By Friction for Rigid Body in Planar Motion and Is work done by torque due to friction in pure rolling?. An answer by @Dale in the second reference provides a very simple way to determine whether or not friction does net work; this is a much clearer answer than many confusing answers given elsewhere.
With slipping, the work done by friction is not zero, it is negative; the negative increase in translational kinetic energy is greater in magnitude than the positive increase in rotational energy. Said another way, the point where friction acts is not instantaneously at rest in the inertial frame of reference. And, in the limit with no rotation (a box just sliding) the net work from friction is its most negative.
Note: the total work on the body is that from friction and gravity. For a rigid body there is no increase in the internal energy of the body (no "heating"). (In reality, no body is truly rigid, so heating cannot be ignored.)