Notwithstanding the fact that the minor child himself or herself is not a party in proceedings on matters concerning the exercise of rights or assumption of obligations with regard to the minor child, the court, for the best interest of the minor child, may when necessary, upon motion by the parents, the minor child, the competent authorities, the social welfare authorities, or other interested parties or on its own initiative, designate a guardian ad litem to act in the proceeding.