|Joachim and Anna standing on the "root of Jesse". Burgos Cathedral, Spain.|
Catholics do believe "all Scripture is inspired by God and profitable for teaching, for reproof, for correction, for training in righteousness" (2 Tim 3:16). One may not deviate in faith from those things that are in the canonical (accepted) Bible nor translate the Scripture in such a way that is against the tradition of the Church.
The story of Mary's parents in the Infancy Narrative was probably based on years of oral tradition (stories passed on through generations) and later written down. The book was written anywhere from 140AD to 170AD.
A Catholic can be in good standing and not believe the story of Anna and Joachim or believe as tradition and history have dictated. A Catholic must believe Mary had human parents. Which is not so hard to do, really.