It would be within his legal right to do so that is to SCOTUS. That said, if the POTUS wanted to whack a guy, they probably wouldn't have gone with the 20 year old at a political rally.
Seriously, he could order the secret service agent driving him around or a number of other trained armed individuals close to him. Instead of making the orange piece of shit a martyr.