The answer is yes, Animate object would work on a corpse. The exact effect would depend on the size of the corpse.
While there are specific defined terms in D&D 5e there are also a equal number of that rely on what the word means in English.
Object - a material thing that can be seen and touched.
Creature - an animal or person.
However there is a caveat. In various effects, powers, and abilities. The D&D 5e rules are consistent in referring to creatures as things that are living or animate. Objects as inanimate things like tables, chairs, rocks, books, feathers, etc. It not spelled out but it is consistent.
The things to remember is that D&D 5e rules are not to function as a wargame. They do not define the boundaries of what is possible during a campaign. The setting is what defines that. Instead they are a tool to aid the referee in adjudicating the action. For example the description of humans don't spell out every detail that could come up. The mechanics about humans are those that the authors feel that are useful or come up often. The important of which is the effect being human on character creation. The author expect referee to use what they know about humans to adjudicate anything that the rules don't cover because it is implied that humans in a D&D setting are just like people in real life only living in that world.
One implication of this is that animate objects doesn't change any other physical property of the object other than to animate with the stats provided. If you were to say animate a block of salt, possible considering what salt miners carved out of their mines, and it was to walk into water, then it is reasonable to rule that it would be affected adversely as salt dissolves in water. Perhaps by treating water as a acid attack on the animated object.
So a corpse animated as a object would still be a corpse and subject to decay, smelling bad, etc. It would not gain the benefits of being undead although at first glance it would be hard pressed for a character to tell the difference. One area where I can see the difference being important is trying to animate a skeleton. It is reasonable to assume that the various create undead spells joins the bones together to form a complete animated skeleton. While a long dead skeleton is merely a pile of separate objects of bone.
For stuff that has no real world analogue, elves, magic, etc. The authors expect the referee to fall back on their knowledge of the fantasy genre. Because the implied assumption that D&D is being used to depict a fantasy setting. Which is why they included a list of inspirational works in Appendix E on page 312.
In fantasy it is tradition for some spells to work on anything, a lightning bolt doesn't care if its target is a person, animal, or a piece of furniture. Some spells to only work on people, for example charming or enchanting a princess. And other spells to work only on objects, like the animated furniture from Fantasia.
Only when the caster is below 5th level
The errata for the PHB has clarified the restriction further from the original printing:
To be eligible for Twinned Spell, a spell must be incapable of targeting more than one creature at the spell’s current level.
By default, eldritch blast does not have a range of self and is capable of targeting only one creature. It is thus eligible to be twinned.
However, the spell becomes capable of targeting more creatures once the caster reaches level 5:
The spell creates more than one beam when you reach higher levels: two beams at 5th level, three beams at 11th level, and four beams at 17th level. You can direct the beams at the same target or at different ones. Make a separate attack roll for each beam.
Thus, once the caster reaches 5th level and above, they can no longer twin eldritch blast.
Note that eldritch blast (and all other similar cantrips) scale with character level not class level as confirmed (unofficially) by Jeremy Crawford on Twitter. (See Do Cantrips use your character level or class level? for more discussion about that)
Best Answer
Don't use the rule in the first place.
If you are not running adventures league you have great leeway to adapt the rules. Object vs. creature vs. illusion and whatever else is one of the rules ripe for ignoring.
Eldritch Blast (as an example) is just sending a beam of force in a certain direction, just let it hit whatever they aim for. Problem solved.
I have always done this and it hasn't caused a single odd situation in my games, in fact it is far more realistic and adds to the game rather than detracts.
Overall whenever you find a rule and think 'this rule is causing a lot of problems' don't then look for more rules to counteract that rule, just ignore it, improvise and move on.