If we are talking about blades like the one you mention a simple mechanics setup can make it useful like you mention. In reality though, few people had the metal/skill/money to actually craft a weapon like that during the time periods mentioned. Some examples that modern weapon smiths can probably create for functional use.
In principle this is a folding knife the size of a sword with the back of the blade matching with the handle to form a small oval shaped buckler with a tonfa like jabbing end(or not if optional hinge only is followed). The handle and blade would have to be a solid material to maintain impact.
- Blade is metal the entire length of the weapon with a blade part on one end and a metal counter part on the other end.
- Handle is a sturdy material like carbon steel or a hard ballistic plastic used in body armor. There is a side handle on this like a tonfa or a full 2 handles like a full shield that you can slide your arm through. Please note the handles on the back need to be significantly lighter than the actual handle material and the handle needs to be lighter than the blade part otherwise your sword tang is way off and the weight distribution is crap.
- Hinge mechanism between the blade and the handle should be fully concealed inside the handle thus preventing impact on the hinge. Rivets with the ballistic plastic would likely be a good option.
- Extension mechanics need to be in place as a typical folding knife uses human finger strength to open. You need to embed an extension mechanism so that when you want to extend it to the sword it will actually move out and lock into position.
- A lock mechanism is needed as well since this is a solid blade for stability a metal brace to keep the blade in place is needed as well. This likely can be a bolt mechanism in the handle which naturally stays locked and fits into the handle or blade part to keep it locked in closed or open states. A mechanism to release the lock is needed as well.
- Optionally you can make it like a true folding sword but you decrease the sword strength as the hinge would maintain the full brunt of the impact on swings and likely break easier. However, the flip side is your "shield" would have a protruding end on it instead of just a solid shield and your hand would have to adjust for the protruding end to enter the handle and extend.
Solid blunt that has a removable end with a blade underneath and the removable part hooks into the handle to extend the handle.
These are made cheaply already. Usually an imitation fantasy idea, but if you utilize high carbon steel it would be solid enough to actually use. The baton length matches the full sword length with part being the actual handle and the other part a sheath for the sword.
Ones that screw in make the baton more stable as the scabbard and the handle will be screwed together instead of just snugly fit which leads to swings making the scabbard fly off. Otherwise some sort of locking mechanism is needed to make the scabbard stay while using as a baton.
Optionally the back of the handle has screw grooves as well so that once removing from the blade the scabbard can screw into the handle making the sword into a sort of shortened naginata or one of the elf swords in lord of the rings battle at the beginning.
A forarm bracer that has a blade extension to function defensively and offensively.
Standard forarm bracer made of a solid substance (Steel or Ballistic plastic)
Blade mechanism similar to a switchblade with a locking for out or in accordingly. This is usually either on the inside of the wrist or the outside of the wrist as you need room for the blade to shoot out without cutting your fingers off.
These are more modern day survival weapons/tools and not historical.
There is a wide variety of these that exist on the market today. Knife axes where the knife is in the handle of the axe.
Saw knifes where the knife part gets replaced with a saw blade that screws in.
Telescoping weapons that extend like batons some including blades and some just turning from a kubotan into a full baton.
Spear that screws together in parts and has compartments for storage and knife etc...
Pretty much anything that modern mechanics can come up with is possible, but most of these are made with stainless steel which is not very good for impact. You would need to take a concept here and then apply high carbon steel to make it worthy of actual combat.
In short, yes it's possible with technology today, but the usefulness of such weapons is likely only for mercenaries or fantasy replicas which makes the production of these custom and extremely expensive or cheap and easily breakable. You need a professional blacksmith/weapons maker and a solid design including the mechanics/weight distribution and movement physics to actually create one. The cost will likely be $500(US) on the cheap side and up to whatever you are willing to pay. For a good 30k you could likely make most anything you wish and it would be fully functional and sturdy.
Note: Ballistic projectiles adds more cost and you will likely end up paying much more than just the standard melee weapons.