Is there a rule of thumb regarding the minimum threshold for a person to be 2nd author of a paper?
There’s no minimum limit. Second authors can contribute ideas, work or anything that went into the paper. Some might even cynically say that contributing reputation is enough.

Having said that, if you’re not satisfied that your friend has actually contributed anything significant to the paper that warrants author status, you can always mention him in your acknowledgement section instead of adding him as a second author.