Do people babble and say private secrets under anesthesia?

Sometimes. Under monitored anesthesia care or conscious sedation, some patients will become fairly chatty. Some do indeed start talking about topics not fit for public discussion. I have some entertaining recollections. It matters very little though as your anesthesiologist will always honor the confidentiality of the doctor-patient relationship. Your secrets are safe.
No. Sometimes on wakeup they may be incoherrant. Sometimes on falling asleep they may babble for a few seconds. Bu tdurign the anesthesia they are unconscious.
No reason to worry. If you have full general anesthesia, you are completely asleep and won't talk at all until you wake up. Under mild sedation, people can speak and sometimes say things that sound confused, but they don't have any urge to tell secrets. This idea is a holdover from when sodium Pentothal was commonly used, which had the nickname of "truth serum". It is seldom used today; we have better medications.
Rarely. If the patient is having a general anesthetic, they have an endotracheal tube inserted their airway and they can't talk. If they are having just sedation for a minor procedure sometimes people talk a little but usually it makes no sense, like when you talk in your sleep. .
Don't worry. Under general anesthesia you will not say or do anything. Essentially in this type of anesthesia you are so far asleep that we take over your breathing for you. Before you go to sleep you will receive a sedative agent which will make you more relaxed. Again it won't make you say or do anything inappropriate.