May one cut a newborn's fingernails on chol hamoed if she scratches her face with her nails on chol hamoed?
YES, one may cut the baby's nails on chol hamoed.
The explanation is:
Although it is understood (see Shulchan Aruch 340; it is considered "gozez" or "shearing" which is one of the 39 melachos.) that cutting nails is forbidden D'Oraisa (with a utensil, but still D'Rabbanan if done by hand or biting) on Shabbos and Yom Tov proper, the Mechaber (Rav Yosef Caro; Shulchan Aruch 532) says that it is permitted to cut hand or toe nails with scissors on chol hamoed, without any restrictions.
However, the Rema, says that Ashkenazim are strict and keep a custom to not cut nails on chol hamoed.
But, Shulchan Aruch 531:6 states that a child (under bar or bat - mitzvah age) may have a haircut on chol hamoed (although the Mishnah Brerurah qualifies this to mean "if the hair is bothering the child.."). The Rema does not argue here. The Magen Avraham mentions (532) that anyone who is on the exempt list in law 531 for haircutting, is also automatically exempted from any prohibition of nail cutting.
Furthermore, S.A. 532:2 says that any medical need is permitted on chol hamoed.
Therefore, a baby's nails (child) may certainly be cut to save the baby from hurting itself (medical need).
If this were a problem on Shabbos or Yom Tov (a much stricter case), a Rav should be consulted on what to do in a specific case. (A Rav might say perhaps that it is no danger to wait until Saturday night, or perhaps ask a gentile nursemaid to cut them for you... etc.)
May you have lots of Yiddishe nachas and happiness from your new baby !