Roll with disadvantage, the NPC is fucking pissed at your genie logic and desperately wants to kick your ass
Raw, that’s a hell no because the NPC didn’t agree to be turned into a sword (and iirc, that’s outside the scope of the spell anyway, no inanimate objects).
It’s really not something that would work in a stable game setting.
That being said, it could still be allowed without being game breaking as long as the DM is willing to make the exception to the rules have a reason for happening. Say, the NPC had gained the attention of some entity that took the opportunity to intervene. Or maybe the NPC felt it coming, and decided to go along with it for nefarious purposes. There’s all kinds of single event exceptions possible.
True Polymorph can turn people into objects.
Eh, back in 2e Polymorph worked a lot like True Polymorph does in 5e, in 3e it was called Polymorph Any Object. I think a lot of players just call it Polymorph, even though there’s a level four spell with the same name, especially if the context of the situation makes it clear which spell is being used. At least that’s how it goes at my table, but every group is different.
In 5e it would have to be a beast. A very magical sword if you ask me.
When the official latest D&D movie doesn’t care about the rules (druid wildshapes into an Owlbear) why should the players?
rule of cool to me means you bend the rules to make the players feel badass, it usually doesn’t mean you disregard the rules completely and do whatever you want. At that point just run a systemless narrative storytelling game.
As for polymorph turning someone into an object, there is a spell that does exactly that: true polymorph.
I am by no means a rules absolutist, some of the best moments I’ve had in games were certainly not RAW, but from experience it feels really shitty to allow individual players to do things that their abilities specifically don’t allow, because often that overshadows other players that either specialized into some abilities that are now obsolete, or might’ve had creative alternative approaches to the problem
Which I always find kind of hilarious since it’s basically expressed on the first page of the DMG.
Only if it’s the 4th level version, which is impermanent anyway. 9th level polymorph has rules for objects: https://roll20.net/compendium/dnd5e/True Polymorph#content
Phrasing is important, right?
A magically sentient sword that can act and fly on its own.
Now the wizard has an unbreakable enemy that will hunt them down for eternity.