Miranda v Arizona, a United States Supreme Court case, was the first decision to hold that if a defendant is interrogated following his or her arrest, any statements that are taken from him or her may not be used as evidence against him or her in any trial of the matter unless the interrogators first advise the defendant that he or she has certain rights. That bundle of rights are now commonly referred to as Miranda rights. This is a requirement across the country.
The reason these rights are given is to afford the constitutional protections of due process, especially the freedom against self incrimination.
The Fifth Amendment guarantees due process about all matters pertaining to laws of the federal government.
Our Fifth Amendment says.... "No person shall be held to answer for a capital, or otherwise infamous crime, unless on a presentment or indictment of a Grand Jury, except in cases arising in the land or naval forces, or in the Militia, when in actual service in time of War or public danger; nor shall any person be subject for the same offence to be twice put in jeopardy of life or limb; nor shall be compelled in any criminal case to be a witness against himself, nor be deprived of life, liberty, or property, without due process of law; nor shall private property be taken for public use, without just compensation."
This has been interpreted by the Supreme Court as both a remedial requirement about other constitutional rights that a person enjoys that have been violated, and additional "procedural" and "substantive" components about how to restore those violated rights.
Public policy does not require that police tell people - prior to being in custody - what they should know by common sense, i.e. you do not need to consent to a search under any law anywhere in our country. Freedom from unreasonable government search and seizure is a fundamental and well know right ensured to all citizens by the Fourth Amendment. Once you say you want to speak to a lawyer, anything you say after that can be the subject of a motion to suppress if you are charged with a crime.
You may find help in my Legal Guide "Constitutional Law: What is Due Process of Law?"
Check with a lawyer in your locale to discuss more of the details.
Good luck to you.
NOTE: This answer is made available by the out-of-state lawyer for educational purposes only. By using or participating in this site you understand that there is no attorney client privilege between you and the attorney responding. This site should not be used as a substitute for competent legal advice from a licensed professional attorney that practices in the subject practice discipline and with whom you have an atttorney client relationship along with all the privileges that relationship provides. The law changes frequently and varies from jurisdiction to jurisdiction. The information and materials provided are general in nature, and may not apply to a specific factual or legal circumstance described in the question.