‘Dogma’ and ‘doctrine’ are not the same thing, and this teaching isn’t dogmatic. Dogma is a divinely revealed teaching of the church, infallibly proclaimed.
There are also other teachings offered as infallibly held but which have not been said to have been divinely revealed, of which this is one. See the following document by then-Cardinal Ratzinger, regarding the publication of Pope John Paul II’s Ordinatio Sacerdotalis (regarding female ordination)::
The key quote is:
A similar process can be observed in the more recent teaching regarding the doctrine that priestly ordination is reserved only to men. The Supreme Pontiff, while not wishing to proceed to a dogmatic definition, intended to reaffirm that this doctrine is to be held definitively.
Hence the teaching is definitive but not dogmatic. The subtleties of these distinctions actually require a lot of expertise to fully understand, and just in case anyone’s wondering, I certainly don’t claim to have such expertise, :o
The document is also quite useful in providing a list - although not an exhaustive one - of infallible church teachings. The church has never compiled an exhaustive list of same.
A useful book on this subject is Ludwig Ott’s ‘Fundamentals of Catholic Dogma’ which arranges church teaching into different categories with regard to whether they are dogmatic, doctrinally taught, commonly held opinion but not established teaching, or superstition (and a few grades in between). The book has two limitations, however: firstly it only goes up to the 1950’s, and there have been significant church teachings since then; and secondly, although it is a superb piece of scholarship, there is no absolute or official recognition of its authority by the church, and so the book is technically open to dispute. It is very much recommended, however. I should add, it’s not a fun read! It’s a dense but rewarding reference work.
In more simple terms, doctrine and dogma are teaching, whereas discipline is the application of rules. Disciplinary rules can change, and frequently do. Dogma cannot change, although it can be elaborated upon, better explained or restated for a different audience or in different circumstances. Doctrine is a broader term that encompasses all official church teaching, but only some of this teaching is infallible and dogmatic, whereas some is infallible but not dogmatic, and other official teachings are neither infallible nor dogmatic - at least, not yet.
We can add to this Sacred Tradition; and less significantly, simple tradition. These relate to matters of established practice or belief that are nevertheless not always officially codified by the church. Again, the Ott volume does a good job of identifying these distinctions.
If you’re struggling with this, you’re in good company. One of the major problems in the church today, in my humble opinion, is that these matters are not well understood (as I’ve said, including by me) and the category errors that result create a great deal of unnecessary tension and unhappiness.
Hope this helps. Best wishes.