I actually had a game where a friend asked me to denounce someone and I said no, then they said okay and didn't backstab.
I used to ignore the denouncing portion of the game but have found it to be super useful in my recent games.
Whenever a civ tries to ban your chief luxury in the world congress try denouncing them. In a couple of games all the other AI civs jumped on board and starting denouncing the civ too. Even though the civ was my 'friend' I'm pretty sure they were maneuvering to back stab me, and the denouncement steered their attention to another civ instead. The AI is a bastard, they'll do things like get you to declare friendship right before trying to settle a city beside your capital so there are 'friends' and there are 'friends'.
Just make sure that the other civ isn't peaceful. If the other civ is someone like Siam then don't bother, all the AI civs will defend them and you'll antagonize all the AI civs.
If you pay attention you can also see what another civ really thinks of you by the face of their leader during diplomacy. Harold will wear his helmet when he's about to declare war, if a civ is negative towards you their leader's face will darken, etc... so pay attention to these things.