Isolated ground on sub panel
A grounding electrode (ground rod) serves a totally different purpose than the equipment ground run with the feeder. One does not, and can not, take the place of or be used for, the other.

For a feeder run to a sub-panel for quite a few years now you MUST run a 4-wire feeder; two hots, neutral, ground.
If the panel is in a detached structure to the house then you must also install grounding electrode(s). There are several ways to accomplish this, but ground rods are the most common. Typically two ground rods are required.

Even with older codes that allowed a "3-wire" feeder (where the ground was omitted and the neutral served both purposes) a grounding electrode was still required.

Bottom line to remember for sub-panels: detached structure needs grounding electrodes, attached or within the same structure does not.