Zain, a U13 – U19 player asks:
If a free kick taker doesn’t ask for 10 yards, is a player from the opposition allowed to stand as close as they want to the ball?
Yes and no (don’t you just love those kinds of answers?). The Law clearly states that every opponent on a free kick, goal kick, corner kick, and throw-in (these are the five restarts by players that can be taken quickly) is expected as a matter of course to begin immediately to retreat the minimum distance for whatever is specified for the particular restart. That’s their obligation under the Law.
On the other hand, the player doing the restart has the right to decide to take the restart even if there are opponents closer than the minimum distance or to request that the referee hold the restart to enforce the minimum distance requirement before signaling for the restart to occur. Either decision has its positive and negative implications. A quick restart against closer-than-allowed opponents may be a positive if the quickness of the restart takes advantage of an exploitable “hole” in the defending team’s formation whereas asking for the minimum distance gives the opponents more time to take up stronger defensive positions. On the other hand, a quick restart with a closer-than-allowed opponent carries the negative potential that, if the restart is not taken the way intended and the ball erroneously goes straight to that closer opponent who can control the ball (this is not illegal under the Law), control of the ball has been unexpectedly lost. It’s a risk, but it’s a risk that only the team in possession of the restart is allowed to take or not take.
Of course, with younger players who are still learning the game, most referees would, in effect, “take over” and make the decision on behalf and to the advantage of the attacking team because they are too young to understand as yet the options. For older, skilled, and experienced players, referees are expected to stand back, let things develop, and step in only when either asked by the team with the restart or if the encroachment is so egregious that the misconduct is not only obvious but serious – particularly if it delays the restart of play by, in effect, preventing the restart from even occurring (e.g. kicking the ball away). And the referee steps in after the restart if an opponent affirmatively violates the minimum distance requirement for the restart (e.g., by rushing in closer than the minimum distance and interfering with play). And then there is the need to manage the “ploys” attempted by opponents to behave just barely enough in an illegal way to delay the restart to their advantage but not enough to catch the attention or the ire of the referee.
So, the Law answer to your question is no, absolutely not. No opponent is “allowed” to be closer than the restart’s minimum distance whether the attacking team asks for it or not. The real world soccer game answer is that, while illegal, it can be ignored by the attacking team – with risks and consequences.
You should note that, as of the 2019-2020 Law changes (see this site’s tab on the subject), there are now several new and unusual “minimum distance” requirements that coaches and players need to be aware of.