Getting the Demon Spirit Out
There areThe rules don't really specify what happens when a few things you can do. An easy onedemonic spirit is Dispel Evil and Good (PHBexorcised, 233-234)so we're going to be using the assumption that the spirit is still around once it leaves the body. If you rule differently, you won't need the latter half of this answer.
Dispel Evil and Good explicitly mentions ending possession of a creature. This will probably be the easiest way to get the demon out.
Break Enchantment: As your action, you touch a creature you can reach that is charmed, frightened, or possessed by a celestial, an elemental, a fey, a fiend, or an undead. The creature you touch is no longer charmed, frightened, or possessed by such creatures. (PHB, 233-234)
Demons are fiends, so they are removed from the host. However, it doesn't really say what happens after that. What is told about demonic possession from the Monster Manual is that demons can do sopossess creatures when their essence emerges from the container that holds it, which implies the demon was bound to an object. Essence here implies more of a spirit or soul, rather than tangible body. You can read about binding demons and possession in the Monster Manual, page 51, under the headers Bound Demons and Demonic Possession. This also suggests that demons can't normally possess other creatures if they have their own tangible body. There's nothing to suggest their spirit can move from body to body willingly, but there's nothing suggesting they can't possess another creature after their spirit has forcefully been removed from the previous host either.
What this likely means is that exercising the demon will probably result in it attempting to possess another creature. So
You have two options:
Sending the Demon Spirit Back to the Abyss
With this option, you're looking to send the demon spirit away. If the DM allows it, the spirit should be able to be targeted by spells. There's no real rules for a spirit, so you'll need to binddecide if this is possible. If it is you can use a simple spell like Banishment to anothersend the spirit back. Another, more complicated way is to cast True Resurrection on the spirit (you'll need to know his true name) and then fight its new body to send it back. You may also use that as a bargaining chip, to perhaps make a deal with the demon, if that is even possible.
You might also be able to remove the demon by finding an amulet it has put part of its essence into. Destroying the amulet will trap the demon in the Abyss for a year and a day (MM, pg 51, Protected Essence). This would probably end possession and send it back all in one go, depending on how you rule it.
Binding the Spirit to an Object
You also have the option to bind the Demon to an object, which is likely how it came to possess something in the first place.
The Monster Manual suggests that The Book of Vile Darkness, the Black Scrolls of Ahm, and the Demonomicon of Iggwilv are the foremost authorities on this subject. The Book of Vile Darkness is detailed in the Dungeon Master's Guide on page 222, in the Artifacts section. Suffice it to say that binding the demonic essence or sending it back to the Abyss is something you're going to have to use your DM powers for. Keep in mind you'll most likely need an evil character to use the book. The Book of Exalted Deeds is basically the polar opposite of this and might also help, altough it doesn't detail any control over fiends and the like, but it does help you fight them and can even destroy an evil creature that tries to read it (if a demon, this would likely send it back to the Abyss).
Either Way...
If you cannot bind the demon, you may be able to use a few other spells to get rid of it. It couldwould be as simple assmart to cast BanishmentProtection from Evil and Good or as complicatedon your party and any participants in the exorcism, as using True Resurrection to give it a new body that you can then kill (you need to know its true name though). This assumes you would be able to target the spirit at all. That call is up toprotects you as the DMfrom possession.
The last way you might It can also be able to remove the demon isused to find an amulet it has put part of its essence into. Destroying the amulet will trapexorcise the demon infrom the Abyss for a year andhost, but only if there is a dayrelevant save (MM, pg 51, Protected Essencethere isn't one listed for demonic possession).
As a final note I'd also suggest a good reason for the possession. The MM suggests that demons that escape their bindings seek revenge on the one who bound them, which could be the noble or someone close to him, depending on how powerful the demon is. Greater demons are usually smarter than lesser demons - I mean that to say that a greater demon would likely plot and scheme through possession, where a lesser demon would likely just rage around and create chaos.