Yes: net work must be done to overcome the dissipative forces acting on the object, even if the object begins and ends in the same place at the same speed.
The amount of work done equals the change in kinetic energy of the object (rotational plus translational) plus the energy dissipated by dissipative forces (heat, sound, rearrangement of chemicals, etc), plus the change in the potential energy of the object.
Energy is conserved, so the energy dissipated by dissipative forces will be equal and opposite the work done by those forces.
That is:
$W = \Delta T + \Delta U + \Delta Q$
Where T is kinetic energy, U is potential energy, and Q is a catch-all for the system's internal energy (heat, sound, chemistry, etc).
The work done by friction goes into the $\Delta Q$ part of our conservation of energy.
To address your example specifically, consider the work $W_f$ done by a friction force $\vec F_f$
$W_f = \int_{path} \vec F_f \cdot d\vec s$
Suppose we use a friction force of constant magnitude $F_f = |\vec F_f|$ and move back and forth in a straight line?
Friction always points opposite the direction of our motion. So if we go from left to right a distance $+s$, the friction force points the opposite direction and is $-F_f$
$W_f = -F_f s$
And if we go from right to left a distance -s, friction points the opposite direction and is $+F_f$
$W_f = -F_f s$
So on for every iteration as we slide the object back and forth. Each time friction does work on the object equal to $-F_f s$ and heats the environment by the opposite of that, $\Delta Q = -W_f = F_f s$. So if the object goes right once and left once and returns to where it started
$W_f = -2F_f s$
and
$\Delta Q = -W_f = 2F_f s$
Since we end right back where we started, $\Delta U = 0$, and if we start and end stationary then $\Delta T =0$. So, over our total traveled distance of $2s$ ($s$ to the right and then back $s$ to the left to get back to where we started)
$W = \Delta T + \Delta U + \Delta Q = 2F_f s$
We can apply the above argument to the integral by noting that, for a friction force of constant magnitude, $\vec F_f \cdot d\vec s = -F_f ds \to \int_{path} \vec F_f \cdot d\vec s = -F_fS$ where S is the total path length.