From what I understand, a solid body or rod should not add work to a system. This is because these bodies internal forces are passed through touch:
If the action and reaction forces are applied at the same point but on different stuck together body segments, the work of the action force will cancel out with that of the reaction since the internal forces are opposite and go through the same path(because they are passed through touch at the same point). Thus, it is clear the work of the internal forces is nullified.
This argument seems to apply to a spring system (for instance a spring with masses attached on both sides) since the spring's internal forces are passed by touch. Thus, apparently, a spring, in a system should not add to it work, which nullifys the need for a spring to have potential energy (since the potential energy comes to cancel out the spring's work).
In which way does the argument shown above fail in the spring's case while working in the solid body's case?