The guardian ad litem so appearing in any action or proceeding for and on behalf of an incapacitated person shall have power to compromise the same and to agree to the judgment to be entered in the action or proceeding for or against the protected person, subject to the approval of the court in which the suit is pending.
NMS § 38-4-16