I think you can tell a person what you would like them to use money for when you give it to them. But I think that's as far as it goes. My Godmother gave me a large gift of cash and told me explicitly that if I didn't use it for my student loans, she would cut me out of her will. That's some bullshit right there. Not a good precedent to set.
That said, if I loan money to a friend and say "Do what you want with this money, but if you buy drugs with it, I will not loan you any more money," I think that's perfectly justified. He can do whatever he wants with that money, but if I find out it's going towards a habit I don't want to support, he's not getting any more money from me.
So no, I don't think you can explicitly tell someone how to spend money you are giving them. I do think that you can offer suggestions, but that's it. I also would say that don't give if you need the money back any time soon. Friendships can last a long time, and debt between friends can be an interest free loan for decades or more. That's the thing about friendship, it works both ways. If I'm out of work and poor, I can rely on my employed friends to help me out. If my friends are out of work and poor and I'm employed, I can return the favor. It's the give and take of a mutual friendship, and I think there's nothing wrong with that. As soon as you start pestering your friends about money, that's when things get uncomfortable.