The neutral must be floated at the garage. NEC normally requires a grounding electrode for a detached garage, but the exceptions do allow you to use the main building's grounding electrode if the ground wire is continuous and spliced in the right way.

So, I don't think what the inspector told you is illegal, but there's no reason he should have had you disconnect the ground rod.

In either case, the neutral bus should be isolated & ungrounded in the garage panel, lest you couple current onto the ground wire connecting the garage subpanel to the main panel in the house.