So you work in a place with at least 1, and maybe 2 people who engage in unprofessional behavior. The person who told the lies (if in fact the information you received in confidence is entirely correct), and the person who said "Don't say that I told you." Exactly how did the 2nd person help you? What's that person's agenda? To badmouth the 1st person? To make you like and trust her? How is this person your friend? What are you supposed to do with the information you received?
I say to proceed with extreme caution about telling either of these people anything at all. You have to concentrate on your work so that the boss doesn't see a lot of personal chit chat and commiserating, and hope that anyone who tells lies is discovered at some point. If the lies are directly related to your job performance, then be sure to document things you do, send confirming emails to the boss, or solicit the boss's direction in moving any project to the next level. Make it clear that you are focused on the company's needs.
Without more info on whether the lies are related to personal or professional concerns, I can't advise you further. But if you speak up and the first person never really said what your friend told you, you will look foolish. I think these 2 other people need to get back to work. If the person is telling lies that affect the company's bottom line or reputation, when you might work on tightening up safeguards in the company which can protect it whether there's an actual problem going on now or not. A bank can put in security systems before the robbery, if you know what I mean.
I'd also go back to the 2nd person and ask why they told you anything at all if it would just occupy your thoughts and leave you helpless to do anything. And I'm not sure the risk of this person "never telling anything again" is a problem - if this is not a person who is courageous, ethical or above-board, what risk is there if you lose this "friendship"?