When my friend have something I want but cannot get, can I say "I envy you"?
Or is there any other good expression for it?
This reminds me with an English poem that starts with these two lines:
"I envy the sand that met his feet
I’m jealous of honey he tasted sweet"
Yes, you can say "I envy you." I sometimes say it.
You have to be careful to make sure it is understood to be a joke, because, strictly speaking, "envy" is a strong and not a nice emotion--it means you feel resentful of your friend's having something.
It is best if you are talking about something fairly small and unimportant--"I envy you for your curly hair," or "Oh, a new car! How I envy you!" so that it's clear that it is not serious. If you and someone else are rivals for promotion at work, and the other person is promoted, it would be unwise to say "I envy you for getting that promotion!"