Either side doesn’t have to be “fully in the right”. That still doesn’t give the dog walker the right to leave when told to stay.
Giving a police officer a fictitious name is a felony in some jurisdictions. So is refusing to stop when asked to.
If the officer refused to inform the detainee that he was being detained, despite being asked point-blank, then yeah, the order to stay was illegal and the guy had every right to walk.
Though it's usually the wisest course of action if you prefer not to bleed or suffer pain, the law does not require you to do everything a cop says.