Catholics say divorce is never allowed, no matter what — is that right?
The teaching is more careful than the absolute version. The separation of spouses, while maintaining the marriage bond, can be legitimate in certain cases provided for by canon law. And if civil divorce remains the only possible way of ensuring certain legal rights, the care of the children, or the protection of inheritance, it can be tolerated and does not constitute a moral offence. The bond and the legal remedy are treated as different things.
Catechism of the Catholic Church, §§ 2383.
Read the teaching itself: Divorce in the Catechism pages.