The Rules of Golf do not place any restriction on who may serve as a caddie, but the Committee may prohibit or restrict caddies in the conditions of competition (see Note to Rule 6-4).
The Committee may prohibit or restrict the use of caddies in a competition.
However, since the Rules specifically permit a player to use a caddie, generally it is not recommended that a Committee introduce a condition prohibiting their use. That having been said, for various reasons, it is common for Committee’s organising junior events to prohibit or restrict the use of caddies, e.g. no parents. In addition, in certain competitions it may be considered appropriate to prohibit professional golfers from acting as caddies.