Within limits. Because it also allows all sorts discrimination against folks that as a society we have decided not to allow. The question then becomes where to draw the line, not allegiance to the principle at all cost.
You're right that there are limits (just as there are limits on free speech), and I don't think any sensible person is advocating for freedom of association on the basis of religion/race/gender. The original comment was proposing that merely holding an ideological position should afford some sort of legal protection - this is akin to firing someone for political affiliations, which is allowable in most cases for private enterprise, with greater latitude for political activity afforded to government employees.
In this case though, the “discrimination” is against people who don’t want to work for the company by offering them 6 months’ salary to no longer work for the company. I don’t really see how that really falls under discrimination.