If one wishes to know the Catholic understanding of Scriptural inerrancy, then one should consult Providentissimus Deus of Pope Leo XIII, which is a majestic document, and the equally marvellous Divino afflante Spiritu of Pius XII. Both Popes are adamant that there is no error in Scripture, yet neither find contradiction in asserting that a narrow focus on the ‘historicity’ of the texts is often counter-productive. One should also consult Pope Benedict XVI’s writings (as Card. Ratzinger) on ‘historicism’ in Biblical studies (see e.g.
christendom-awake.org/pages/ratzinger/biblical-crisis.htm)
In fact, the Church has hardly ever deemed it fit to pronounce on the ‘literal’ meaning of any passages of Scripture, except for those where the historical fact is obviously crucial for our faith (e.g. the Resurrection, a
sine qua non for any Christian, as St Paul affirms). To that extent, a considerable amount may be considered ‘up for grabs’ in the sense that one is never allowed to believe that the author made a mistake or lied - but what constitutes a mistake? The Church does not comment unless she really has to, but the author’s intention (both the human and Divine author) is preserved by Sacred Tradition, which gives us the hermeneutic to see what is True (rather than merely true) in the passage in question.
Where an historical fact is stated or presumed, I would argue it is perverse to assume it didn’t happen unless there are very good reasons as in the book of Judith. In Judith, it is in fact missing the point altogether to suppose that the author ever intended to provide a factual historical account, and in fact most Catholic scholars nowadays are inclined to think that the precise opposite is intended, i.e. deliberate ‘errors’ which draw the reader into the real meaning of the text - signposts, if you will. If you refuse to play this game, then it is in fact you who are imposing on the text and therefore on God the sort of limitations that Pope Leo XIII condemns so forcefully.
When Our Lord, or St Peter, or any of the Church Fathers refer to the Old Testament stories, again you are entirely missing the point, and therefore doing Our Lord no good service, if you construe such statements merely as affirmations of historical fact. No, Our Lord repeatedly shows how everything in the Hebrew literature was pointing towards Him; it’s Truth is precisely contained in the fact that it was about Him. This is the hermeneutic that Our Lord bequeathed to the Apostles, and which they consistently demonstrate. In fact, if you look at the biblical studies of the Fathers, they are hardly ever concerned with historicity and extremely interested in allegorizing - reading with the hermeneutic of Truth, that is the fulfilment of Christ.
None of which is to say that the historical details cannot be right as well! As I said, one should assume they are historically grounded until proven otherwise. In the case of Noah’s flood, I think we can learn something from recent developments in Homeric studies and work on near-eastern epics. Although there are massive divisions among scholars on the thorny question of oral poetry, nearly everyone is at least agreed now that Homer’s poetry derives from an oral tradition stretching back way into the previous millennium or further; there is considerable contact with the aforementioned Giglamesh, and various other epic titbits. Recent studies have shown these cropping up in the Homeric Hymns (not by Homer!!) as well, while it has been known for a long time that much of Old Testament narrative has features in common with this culture.
Therefore, I think we can say with confidence that the biblical account of Noah’s flood derives from an oral culture, the same oral culture which produced Gilgamesh and the various other versions of the story. However, the next interesting question is what gives rise to the original oral creation: and in the case of Homer’s epics, it is now widely accepted that there really was a Trojan War. In fact, not just one war but several! The probability (in my view, having researched this at length) is that Troy became associated with famous wars to the extent that all kinds of stories developed about it, and different aspects got added into the tradition at different times and places before the eventual song we now know as the Iliad.
I’d suggest the same happened with Noah’s Ark, in so far as there probably was a great flood, as has in fact been confirmed by some archeological evidence. This was probably great enough to spawn many stories, but what distinguishes the Jewish version was that they could understand the events through the eyes of Revelation. Therefore the bits that got ‘added in’ are not so much embellishments of mythology, as in the Homeric tradition, but rather readings of that tradition provided by God Himself. And it is therefore these readings, and not any supposed historicity, which has the ultimate value for us today. We are not required to be historians, but we are required to listen to what God wants us to hear; and we will hear this if we read the Old Testament as Our Lord read it, i.e. through His person.
(Sorry for the length of this comment, but I hope it clarifies a few misconceptions in the discussion so far).