One word for this might be “shunning”. The right to free association is double edged, with a right to disassociate being the sharper of the two.
Shunning was practiced in the Bible...a LONG time ago.