Yes. It’s an honest mistake.
There’s only a few circumstances that can effect the validity of the Mass:
- If the person celebrating is not a validly ordained priest.
- If valid matter isn’t used. The Church teaches that bread (flour and water only), and wine (must contain at least some alcohol) may be used. If a priest used crackers and grape juice, this would be invalid.
- If the priest doesn’t use the Words of Institution. The Council of Florence states “The words by which the Savior instituted the Sacrifice are the means by which the Sacrifice is confected.” That means “This is my body,” and “This is my blood,” et al.
As long as these are followed, the Mass is valid.