4e doesn’t have rules for limb-loss and therefore does not have rules for what to do about it
Since the game rules do not include any way for you to lose limbs, they also do not include any solutions to lost limbs. If you houserule in limb loss, which I strongly recommend against, you also have to houserule any solutions. There was a similar situation in 3.5; this question and answer may therefore be useful to you.
Note that the discussion in that link of the game’s tone and premise is even stronger in 4e than it was in 3.5; 4e is even less interested in modeling these kinds of injuries than 3.5 was. Limb loss houserules cause even larger problems and represent an even larger departure from the game’s expectations. Even more than in 3.5, this sort of thing (the possibility, the consequences, and the potential remedies) should have been discussed before the game ever started.
But warforged can attach or embed “warforged components”
Warforged components, that is, items that can be attached to or embedded in a warforged, do exist. These items are usually specifically designed for the purpose, but weapons (such as this sword) are an exception, per Eberron Player’s Guide page 114:
Weapons can be embedded or attached components. Two-handed weapons cannot be attached or embedded. A one-handed ranged or melee weapon can be attached to a hand, although you can still have only one weapon per hand, regardless of whether the weapon is held normally or attached. An attached weapon occupies your hand, and you must remove it to free the hand. A one-handed weapon that has the off-hand or light thrown property can be embedded.
But this is attaching the weapon to a hand, to be used as a weapon. Not attaching a sword to a leg-stump and attempting to walk on it. Since, per the above, there is no way to end up with a leg stump in the first place, the rules do not cover that, nor do they address the idea of “improvised components.” So while the rules do describe some body modification done by warforged, they fall far short of describing any process that would enable a warforged to do what this one would like to do. That must be a houserule.
For what it’s worth, the warforged are definitely described as tough enough to manage this process. Body modification is a common part of post-war warforged culture, and is a painless process for them. Reforged1 even go so far as to completely swap out most of their body parts for a more “organic” ones. Furthermore, seeing as limb-loss is, at least in my opinion, a really poor addition to 4e, I would personally be very quick to allow any convenient solution to eliminate the problem.
Realistically, it doesn’t make a lot of sense that a sword peg-leg would be just as good as his existing leg, but I probably would make it such anyway for the good of the game. I strongly recommend against permanent or significant penalties. Extremely temporary, rather minor penalties could be acceptable, particularly if this is the end of a dramatic arc and the warforged will be able to visit a proper repair shop soon.
- Races of Eberron, which is a 3.5 book. 4e does not seem to have replicated the class as an option but presumably they didn’t disappear from Eberron.