There's already another mod for that! Check out https://forum.minetest.net/viewtopic.php?id=4457 !
A very simple mod that changes the behavior of the teleport command.
At first: /tp is a shorthand for /teleport
Players that do not have the teleport privilege can invoke /tp <player> (or /teleport <player>) to send a teleport request to that player. If the targeted player accepts it by executing /tpa <player>, the player is teleported.
This is especially useful for servers. Players can teleport, but unauthorized teleporting is not possible.
License: WTFPL
Depends on: nothing