Sometimes it's better to be a listener, not a teller. If your friend isn't ready for a truth, you may just loose a friend.
Sometimes it's a great help to nudge them towards the truth. If they can figure out the truth themselves ( with a little nudge maybe), it can be a revelation, not an accusation. And they can act on it in a good way.
But if it's the clear choice between truth or lie, try for the truth. When lies are exposed, trust is really damaged. Even if the lie was with good intent.