Yes. All Apple MagSafe adapters have universal / interchangeable connectors where you can use your preferred length and polarity and terrestrial connection with regional preference to the power supply.
The internal connector is standard IEC C5 or C7 and Apple Adapters are connected to the metal grounding rod, possibly based on the wire or adapter selected. Get a good picture of the gap, since a drop or crush can make the part very tight to remove. The removal is pretty linear with not much play, so hopefully you don't have to break things in order to get it apart.