I’ve read guide to confessors so I’m aware of the fact that priests can sometimes deny absolution but I’ve never heard of a priest being able to not even tell the penitent they are doing that. When would that be allowed or right and what’s the source?
They can withhold the intention for the integrity of the sacrament when one is not ready to give up the sin and could lose the faith if notified, he is not being absolved.
It may be in "ROMAN RITUAL + SACRAMENTS AND PROCESSIONS". I read it from an authentic source which is why it stuck in my head. Because it was news to me as well until I understood the reasoning behind it. Sometimes it can be better for the soul in the long run to keep them in ignorance.
It comes down trivializing the sacrament for non-repentant sinners by absolving; or scandalizing them out of the faith by telling them you cannot absolve them; the third option is to keep them in their ignorance,
so they will not be guilty of further sin by sacrilegious confessions or communions or losing the faith, better to keep hope alive so God can work in them rather than risk putting them in position where they will cut themselves off. Legitimate cases for it will be rare.
If someone finds the contrary in an official work, please share. I'm always open to learning and being corrected. Maybe I forget or misunderstood what I read.