I have this in my NodeUtil class, which does what you want:
var old_transform = node.global_transform
var oldParent = node.get_parent()
node.global_transform = old_transform
The basic principle is that you need to remove the node from the old parent, then add it to the new parent.
This also retains the object's transform and coordinates, which is important to understand. If the object was at [1000,1000,1000] before you reparented it, it will still be at [1000,1000,1000] after reparenting it. You'll need to change its position to something more suitable to the new parent. In your rocket, for example, you'll want to set its position to something relative to the rocket (like [0,0,0]) after reparenting.