Whenever in any proceeding under §§ 33-9-14 — 33-9-18 there are contingent interests of persons not in being or not ascertainable or interests of persons non sui juris, the court may appoint a person to represent the contingent interests or a guardian ad litem to represent the interests of persons non sui juris, and in case of that representation the decree entered in the proceeding shall bind all interests.