In order to negate the forces you need something to push or pull the two objects away from each other
Based on your comment on @StephenG's answer
I stated in the question that Earth was just an example. The reason I
was thinking to do some thing like this, was to remove an uninhabited
planet from its orbit. Perhaps cause a controlled collision. If I'm
being very imaginative I could probably think of ways to use it in
This is completely theoretical and assumes current theories are reasonably accurate but if you could harness the force of Dark Energy and be able to create it or move it with a relative amount of control, and place it in the barycenter of the objects' system and have it strong enough to negate gravitational force, then the objects will continue in their current path without affecting each other. The dark energy would also need to follow the barycenter of the system to continue its effects on the objects. Obviously this would be extremely difficult, but in an advanced society that wants to annihilate a planet with another planet and finds that as the most resourceful method of reaching their goal, they probably already have this and other superpowers under their belt.
It's also important to note that gravitational force between two objects goes both ways. I can't conceive of a way to negate just one object's gravitational pull and not the other's, which is what I'm getting from your third clarification:
I am asking about potential ways to negate the gravitational
attraction of specific objects on specific celestial bodies.
All force have to cancel out, i.e. Net Force has to equal 0, which is what you can achieve with dark energy inside the system or perhaps dark matter pulling the system away, but between the two options this seems even less viable than the first.