This sounds like shunning, a practice I do not think that the Catholic Church supported. Individual priests or bishops may have advocated it, but not church doctrine.
Thus, it must not be thought that in all cases of invalidly married relatives or friends, Catholics should completely ostracize and avoid them. Saint Paul, in one of the admonitions quoted above, commands Christians not to look upon sinners as enemies, but rather to admonish them as brothers.