The DM can do whatever they want
Your DM is the god of gods of your world. Could they do it? Absolutely.
However, your DM may have something more than that involved. It wouldn't feel very good for the players if the DM kills them on a whim, so often there are rolls involved in dying. Normally this involves taking a bunch of damage, then failing a bunch of death saves. In this situation your DM may use attack rolls or death saves as a proxy for the ogre tearing your player apart, or they may use some other mechanic.
Be aware that every attack against you while you are dying forces you to suffer a death saving throw failure. If they are within 5 feet if you when they attack (as the ogre would be) then each attack is automatically a critical hit, and forces you to suffer 2 failures. What's more, if the damage equals or exceeds your hit point maximum, you suffer instant death.
Death isn't the end
In real life, the afterlife doesn't have much gameplay. But in 5e you can be resurrected in a dozen different ways. There is all kinds of magic that will bring you back to life, which is generally readily available at churches, temples, healers, etc. However, this may be a costly service, both in terms of money and favors. You may find yourself in debt to the local paladin order, which may mean you need to repay them with quests.
That is, unless your DM decides that it is. Your DM could do a multitude of things to make revival impossible, and they could deny any wish to bring you back. If the DM wants you proper dead, they can do it.
If you suspect your DM is going to kill you outright, the only thing you can do is tell them you don't want that
It seems like you like the character, but your DM and party maybe don't (or at least they think it would be a fitting end). Since there isn't any rules stopping your DM, and there's nothing you can do in game, your best choice is to take out of character options.
Tell your DM "I know you and the other players would think it's funny to kill my PC, but for me it's not so fun. If the character dies because of bad rolls and bad choices, ok then, but I don't want to feel like you killed them off unfairly."
Maybe think about how you designed your character if everyone wants them dead
I know you didn't say your party/DM actively want your PC dead, but it feels like that's probably something you should think about. Yes, it's legitimate to play an anti-social, annoying, selfish character. But, ultimately D&D is a social game, and it can be difficult to separate a player from their player character - and rightly so, since you are the one making your character annoying and selfish.
Perhaps this event could be a turning around point for your PC, when they realize maybe they should treat their party a little better, or next time an ogre really will tear them in two.