You can! When the server brings the slip back to the table, your friend will have to sign it, authorizing the tip. They can't just fill in a tip and leave it blank. At least, that is what they told me when I used my card recently.
And what my Aunt has told me (she works for corporate).