This can be done, but you'll need a few command blocks to do it. The use of the scoreboard feature is what allows this to work.
Let's say you want to teleport a player holding a nether star out of the world (I don't know why you would want to do that, but let's say you want to do that). First of all, you'll need to set up the scoreboard:
scoreboard objectives add holdingstar dummy
You only need to do that once. Now that that's done, you can set up your command blocks (you're going to want to set them up on a clock so that they run continuously). You're going to want to set this score to 1 for all players holding a nether star, and 0 for all players not holding a nether star. Unfortunately, there isn't a way to check if a player is not holding a specific item, so the solution becomes a little more kludgey. Running these two commands in sequence should do the trick though:
scoreboard players set @a holdingstar 0
scoreboard players set @a holdingstar 1 {SelectedItem:{id:minecraft:nether_star}}
This sets the score of holdingstar
for all players to 0, and then sets the score of those holding a star to 1. Now that we have the scoreboard checking for what we want to check for, we can pass the score into a selector:
tp @a[score_holdingstar_min:1] ~ -1 ~
Bye bye, everyone who has a nether star selected. If you do happen to run this on a clock, keep in mind that it will keep running the command over and over again; there's no way to tell the system that it already performed this command on this player. This is fine for /effect
commands and the like, but it complicates things for /tp
commands. Just something to keep in mind.