When my opponent first serves a ball, can I set and pass the ball over the net?
My friend told me that this is a fault - but the ball was coming towards my face, so I don't see what else could I do.
It is not a fault to set the ball back over the net on the first contact. Two exceptions to this:
However, none of this means it's a good idea to play the ball directly back - you should always be trying to pass the ball to your own side one way or another.
In beach volleyball like with indoor, setting the first ball of a rally (not serve) has traditionally been allowed including over the net. It's possible the rules have changed, and it's fair to note the AVP (from the USA) and the FIVB may have (had) different rules.
One commenter notes the FIVB has a rule 22.214.171.124 from the 2017-2020 edition, stating "the first hit of the team... may NOT contact the fingers/hands". While this sounds conclusive, this is an ambiguous statement, because the first hit of the two teams are: 1. the serve, and 2. the first play of serve receive. Setting a non driven first ball of a rally (not serve) has been legal for decades and if it's changed, it needs to be clarified clearly in the rules. But FIVB rules reflect the game, they were not intended to change it.
Have a look at this clip where in a major FIVB tournament match, the first ball of a -rally- is a set at 10 seconds and it's not called, nor do either of these first class teams, the ref, or the announcer complain. In fact, the player who set's this rally ball was complaining about a possible lift on the other team just before he sets the first ball of a rally.
This proves the rule probably still does not apply first touch in a rally, or if it does now it's a new rule, or at the highest levels they still don't call it. It's seen as legal by the experts. Look at the comments on youtube, many people say exactly what I'm saying here. Traditionally, and maybe still today, it was always about the quality of the set in the context of the ball coming over the net not being a hard driven ball. There's also a reddit on "Beach Volleyball Rules: A Refresher" which states the same thing I'm saying here: "Setting first ball is allowed."
In the case of hard driven balls (which can be dug over net) rule 126.96.36.199 mentions one may contact the ball with "overhand fingers" (in a setting like motion) but this is not in fact a set.
The next part of the question is, if one sets a ball over the net, the ball must travel perpendicular to the shoulders of the person setting the ball. That is rule 13.2.5. This means, the set must go directly in front of or behind the setter.
If 188.8.131.52 does apply to rally play, it may be a relatively new rule and is not universally enforced even by refs at the highest level. The play in the clip above where the first ball is set has been legal and performed thousands of times since the 1980s in the USA (AVP) and more recently in FIVB international play.