In theory, yes. But in reality, a non-citizen has much more to lose (being denied entry, which is a stain that remains on your record for quite some time) from arguing with a CBP officer about their rights than a citizen does.
The law is irrelevant when LEOs can side-step it whenever they want.