The events that led the BBC to sever its relationship with Carol Thatcher have parallels in every workplace and are a reminder of some of the basic issues of discrimination law.
Under the Race Relations Act 1976, harassment occurs if a person engages in unwanted conduct on grounds of race or ethnic or national origin that violates another person's dignity or creates an intimidating, hostile, degrading, humiliating or offensive environment for them. But, the person offended (or intimidated etc) by the conduct does not have to be the person of race or ethnic or national origin: A can make a remark that offends B on the grounds of C's race or ethnic or national origin. That is reportedly what happened in the Carol Thatcher case. The remark can constitute harassment provided it was reasonable in the circumstances for B to be offended by it.
It is difficult to justify a distinction between a more typical harassment case, in which it is the victim's race or ethnic or national origin in question, and the type of situation that the BBC had to address. In both cases, dismissal would seem to be an appropriate sanction if investigations reveal that harassment took place.