Most "trick" weapons have historically been the tools of spies and assassins, and the trick was disguising a weapon as an innocuous object. That doesn't seem to be what you are interested in.
The M203 and Master Key are secondary weapon systems (a 40mm grenade launcher and 12 gauge shotgun respectively) which were designed to attach to an assault rifle. ...
I unfortunately do not have a very complete answer, but partial answers are worth something, I suppose. There's some discussion here about a sword vs. spear bout that reminds us that, outside of movies, it's not that easy to just knock a spear down and keep it there.
I think the hard part is actually grabbing the spear without getting impaled on it. Look at ...
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 ...
Shikomizue katana sword, or popularly known as the Zatoichi sword, is a weapon which is disguised as a walking stick but actually a sword. It is believed to be invented during the Meiji Period (1868-1912), when the public carrying of weapons were restricted.
Here is one example of a "trick weapon", the "MPMS" Multi-Purpose Metal Stick, which claims to allow the user "to combine or unfasten with a simple twist of the wrist" the unit into nightsticks, nunchuks, batons, or a billy club.
That said, I have not found any demonstration of this in use, so your mileage may vary.