Nowhere in the US are you required to carry ID. In some states, including NY, in certain circumstances, police can ask you your name & other identifying information.
A cop has discretion to issue a ticket or place you under arrest when they intend to charge you with a misdemeanor or an infraction/violation.
It's a bit more complicated than this, but essentially it comes down to when the police take "custody" of you.
But that's it.
You should say, "I will not speak to you without a lawyer."
What I should have said is (1) they cannot demand you answer them and (2) before any custodial interrogation they should read you your Miranda warnings.