This is what the cops count on. Same as in DUI checkpoints, telling you to just let them search your trunk when they pull you over for speeding and then they'll let you get on your way, etc. The initial response by cops to saying things like "Are you detaining me?" "Am I under arrest or am I free to go?" "Do you have a warrant?" is usually pretty hostile - things like "You don't want to know what happens if I have to wake up the judge for a warrant at this time of night" "Do you have something to hide?" "I'm just doing my job, why don't you just let me do it and we can both get on our way, etc" -- Depending on the personalities of the cops involved, it can rapidly switch back and forth from good cop to bad cop. But they really do work and generally will respect the rule of law if you stand up for it.
They are trained to make you give up your rights voluntarily, not to abuse them and possibly have a lawsuit etc on their heads.
"Non-citizens who are in the United States—no matter what their immigration status—generally have the same constitutional rights as citizens when law enforcement officers stop, question, arrest, or search them or their homes. "
However
"Non-citizens at the border who are trying to enter the U.S. do not have all the same rights. "
You also have the right not to disclose your immigration status to ICE without speaking with a lawyer first, you have the right to have your consulate notified if you get arrested, and generally cops aren't allowed to just randomly ask people for their immigration status.
Note: at the border none if this applies. It is pretty much a "rights free zone"