If it is someone else’s secret, yes. I had a job for a while where I was privy to company secrets and never leaked anything, but when the information became public and it was known that I had prior knowledge, others would try to get me to share information. While I don’t lie, I am pretty good at playing dumb.
In my current job, I am called in as a union rep if a teacher wants one at a disciplinary meeting and of course that has to be strictly confidential so I can usually put that information right into deep storage. However people gossip about who is seeing who and who is feuding with who and I am not averse to talking about that.