The magic circle spell has the following effect in its description:
The creature can't willingly enter the cylinder by nonmagical means.
So the theory is that if someone possessed by a ghost is restrained, then they can be forceably pushed into a magic circle. The ghost possessing the person cannot willingly enter and therefore must leave the body it's possessing.
This seems to make sense, but there are two possible problems with it. First, if the possessed person is forced into a magic circle, does that imply that the ghost is actually being forced into it? I guess another way of asking that is, is the barrier sufficient to force the ghost to voluntarily break possession to avoid unwillingly entering it?
Secondly, the description of the possession effect states:
The possession lasts until the body drops to 0 hit points, the ghost ends it as a bonus action, or the ghost is turned or forced out by an effect like the dispel evil and good spell.
The dispel evil and good spell is 5th level. Magic circle is 3rd level. A guideline I've always followed (although I don't know if it is in any way official) is that when an effect gives an example of a spell that could break it, an alternative spell would need to be of a similar level. The rationale is that if possession is strong enough that it requires something like a 5th level spell to force the ghost out, then the amount of power in a 3rd level spell just isn't going to do it.