There are actually two possible solutions for this requirement.
Solution 1 would be using the hierarchical algorithm's support for incremental layout. To do that, first select the nodes you want the algorithm to rearrange. (Make sure the nodes that should remain as is are not selected.) Then run hierarchical layout with option "Selected Elements Incrementally" enabled.
Solution 2 would be using "Layout" -> "Selection (Partial)".