Sure, why not? >;D
I think the most important thing is consistency- It might be weird if your story's universe usually plays by real life's science rules most of the time but decides to look the other way just for moments like this, unless some sort of explanation for "why?" was given or insinuated.
An example would be like... I dunno, like if the gravity power character used the influence of another object's gravity in proximity to harm people at another point, but this time there was no similar effect. That becomes an inconsistency that people might pick up on and scratch their heads over unless some reason was given.
On the other hand, if crazy, science defying stuff is the norm, then a scene like this would be just another drop in the bucket. Many fantasy stories take heavy creative liberty with what's "possible" or not by writing their own world's rules and abiding by those, regardless of how sensible they would be in reality.
Lastly... I do think that it's okay to be inconsistent sometimes too. I imagine the amount of readers who would be picking apart the scene due to not following the laws of gravity accurately would probably be in a small minority compared to those who would be like "Whoa that was awesome!"
Looking back at the above example, maybe gravity character's powers typically abide by the scientific rules but it's never explicitly shown that pulling a large object in would instantly kill a lot of people. In that case people will probably be willing to suspend disbelief or not even think about the actual consequences of the weaponized planet scenario given in the OP.