A man would like to sit with his mother in the women’s section because she has severe dementia and cannot sit in shul on her own. A woman from shul can volunteer to sit with her, but the comfort of her son next to her is a significant difference. Can he sit next to his mother?
A man with a physically debilitating sickness has a female aide (not Jewish) who needs to sit next to him in the men’s section. Can she sit next to him?
Many do not view the purpose of a mechitzah as to ensure that there is a barrier between men and women when they are davening, we don’t demand this when praying in a shiva house or at a wedding. Rather, it is a structural requirement of the shul (perhaps modeled off of the בית המקדש). Therefore some have the approach that if the men and women are physically separate a mechitzah is not needed if it is not a מקום מיוחד לתפילה.
Taking that one step further, we can argue that this would allow occasional presence on the other side, as long as it did not fundamentally undermine the meaning and function of the mechitzah. That is, if men and women were to sit on both sides, the shul would have a wall, not a mechitzah. But if there is a crossover occasionally for special reasons, it’s identity as a mechitzah would remain. I believe that it is for this reason that Rav Moshe (Iggrot Moshe OC 5:12) states that in Europe a woman would stand at the back of the men’s section to collect money or to say Kaddish. There was only one or two women, and it was not derekh kevah (which in my read would challenge the identity of the mechitzah). I think this is directly relevant to this case. Although it is more קבע, the person is clearly not there in a davening role and purely there as an appendage of the davener. Effectively they are meant to invisible and this I think it is totally fine.
The other approach supposes that the purpose of a mechitzah is to prevent men and women from davening in the same space, and it is not about the structure of the shul per se. I would still make the same fundamental argument here, that someone completely outside the community of daveners does not create a coed reality for davening. This is certainly true for the non-Jewish aide, but also for the son who is not there to daven but only to help his mother. I think a spectator, on the other hand, would be a problem since such a person could, and even might, choose to daven along.