Thanks for the question.
You picked one of the more confusing times in the Church's history. I'm not sure whether this was your choice or a Protestant brought this to your attention.
There does appear to be a period of time where popes and successors to the papacy were going back and forth debating whether Pope Formosus' ordinations were valid or not. Formosus's successor, Pope Stephen VI, appeared to be a key party to this.
For such a confusing period in time, it's always key to choose reliable Catholic sources to discern an answer. I found that last two paragraphs from this New Advent article helpful to understanding the situation at the time:
- Is a pope infallible when he declares someone to have invalid orders?
- How does that play into this situation?
No, he is not infallible when declaring invalid Holy Orders. He is infallible when he officially teaches the faithful on issues of faith or morals.
Each of the seven sacraments requires one valid form and one valid matter.
In Holy Orders:
- The form
- are the words used during ordination prescribed by the Church.
- The matter
- is the imposition of hands.
If there is a period of time, like the one you have chosen, where clergy are having mini-family fights, the worst scenario that could occur is there may be a period of time where men, who truly believed they have been ordained priest, hadn't been.
In these situations and similar ones, like a baptismal case where the baptizer accidentally misses the head of an infant when baptizing, the rule in the Church, and in canon law, is that the Church supplies (Ecclesia Supplet | Canon 144). This means that whatever is inadvertently,
non-intentionally missing in the sacrament, is made up for by the grace of the Church.
Rev. Mark J. Gantley answering a question on the EWTN web site stated:
Ecclesia Supplet (the Church supplies) does not make up for invalidity when the matter or form (the essential elements and correct words) are omitted or altered.
I hope this helps,