The Supreme Court has held that even if the police have a flawed understanding of the laws and rules they are enforcing, their flawed interpretation governs the interaction on the street. So what the office believed matters, and that in turn guides his/her behavior. If you're in the right, you can usually be vindicated after a brief trip through the criminal justice system (arrest, jail, court). But it's guaranteed to ruin your day.
Safest bet would have been to ask "Am I free to go?" to find out.
Even if one is detained, one is not legally obligated to produce ID (even if one has it in one's possession, which also is not required.)
I would think there is some overlap between reasons to invoke those statutes and reasons to detain.
Is it simply the case that none of those laws require production of a document?
In practice, this means that you may assert your right to the police officer, who stridently disagrees based on his misunderstanding of the law. You will then be put into handcuffs and taken into custody (at best) and be jailed. Your arrest mugshots will be posted to the public Internet, handily available for any employer doing a background check on you. You will get someone to come to the jail and post bail on your behalf. You will spend money on a lawyer to defend you. Your charges may be summarily dismissed, but you may not find that out until the day of your court appearance (so you had to hire a lawyer anyway).
You will have proven your point.
It's far easier to ask "Am I free to go?" in an encounter like the one described. Even better: ask a civilian for directions.
However, I note as a counter example that the last time I asked a member of the public for directions it was in the US, in Baltimore, the morning before a riot. He directed us to a station far from where we needed to be and in an area of town which looked a bit dodgy.
Gee, how convenient. And not consistent with the constitution, particularly according to this case, the fourth amendment doesn't have an exception for "cases where the agent of the state is confused".
The slightly (but not much) more nuanced explanation is that 99% of police officers do not know the finer points of laws because they don't need to. They know just enough to get an idea of whether or not a person has broken a law. Once they get enough information to arrest someone, it's up to the DA if a law was actually broken and if they want to pursue charges.
It's not generally relevant to the police officer's day-to-day interactions with the public to have enough knowledge about the law to clarify the finer points of it to a layman, as they're mostly laymen themselves.
Edit: Just to clarify, I'm not saying this is the ideal, just that this is how it is currently in the US. The police pack the pipeline to the DA and the DA decides which cases to pursue (press charges) and which to ignore (release).