Can I tp someone holding a specific item in minecraft windows 10 edition?
There isn't a good way to inspect player inventories on bedrock. The closest you can manage is something like the following:
/enchant @a sharpness 1
This command would succeed if any player is holding a sword, but can't be made to be limited to a type of sword. It also can't be used to determine which player was holding the sword.
The following command will detect if someone has a diamond sword in their inventory, but not whether they're holding it.
/clear @p diamond_sword -1 0
If you're willing to compromise your design a little, you could have the player drop the sword and then detect it via the following command chain:
/execute @e[type=item,name="diamond_sword"] ~~~ tp @p x y z
This largely guarantees the player who had the sword is teleported because the item will be closest to the player who dropped it.
This leaves the player without a sword however and leaves the sword available for the other players to pick up. Both problems are solvable by additional command chains.
You can kill the sword to remove it so other players can't get it.
/kill @e[type=item,name="diamond_sword"]
And then give the teleported player back a diamond sword.
/replaceitem entity @p slot.weapon.mainhand 1 diamond_sword
This will have the side effect of restoring the sword's durability.