The question has several underlying premises.
The Catholic Church considers the Book of Wisdom to be canonical, i.e. it belongs to the Scripture.
For Catholicism, infallibility of Scripture means "every part of Scripture is literally true".
In Wisdom 9:8 (or else) the author claims to be Solomon.
Premise 1 is of course true. Yet, notice that premises 2. and 3. imply that Catholicism must consider Solomon to be the author of the book. However, this clearly contradicts the "scholarly consensus" that Solomon did not authored the book (consensus which is actually the case, see below). Hence, one of the three above premises must be wrong. The OP seems to hold the idea (by the tone of the answer) that premise 1 the problem, i.e. that the Book of Wisdom should not be considered canonical, as many protestant denominations do.
The problem however is with premise 2. The Catholic Church does not ascribe to fundamentalism. The Catholic Church has never declared the Bible to be inerrant (a la Protestantism). In fact, this position is openly criticised. For instance, this 1993 document by the Pontifical Biblical Commission states:
The basic problem with fundamentalist interpretation of this kind is that, refusing to take into account the historical character of biblical revelation, it makes itself incapable of accepting the full truth of the incarnation itself. As regards relationships with God, fundamentalism seeks to escape any closeness of the divine and the human. It refuses to admit that the inspired word of God has been expressed in human language and that this word has been expressed, under divine inspiration, by human authors possessed of limited capacities and resources. For this reason, it tends to treat the biblical text as if it had been dictated word for word by the Spirit. It fails to recognize that the word of God has been formulated in language and expression conditioned by various periods. It pays no attention to the literary forms and to the human ways of thinking to be found in the biblical texts, many of which are the result of a process extending over long periods of time and bearing the mark of very diverse historical situations.
Fundamentalism also places undue stress upon the inerrancy of certain details in the biblical texts, especially in what concerns historical events or supposedly scientific truth. It often historicizes material which from the start never claimed to be historical. It considers historical everything that is reported or recounted with verbs in the past tense, failing to take the necessary account of the possibility of symbolic or figurative meaning.
In effect, the Catholic Church does not adhere and has never adhere to such "literalness" interpretation. In fact, another very important implied assumption of the question is that the Catholic Church does assert Solomon to be the author of the Book of Wisdom. This is also false.
Regarding the "scholarly consensus", in effect, the Book of Wisdom is considered to be written between in late 1st century B.C., and definitely not in the time of Solomon. This is for instance, expounded in this 2011's book (see section 2.3). The Catholic Church does not oppose this position. E.g. already in 1912 the Catholic Encyclopedia stated:
Of course the fact that the entire Book of Wisdom was composed in Greek rules out its Solomonic authorship. It is indeed true that ecclesiastical writers of the first centuries commonly assumed this authorship on the basis of the title of the book, apparently confirmed by those passages (ix, 7, 8, 12; cf. vii, 1, 5; viii, 13, 14, etc.) where the one speaking is clearly King Solomon. But this view of the matter never was unanimous in the Early Christian Church, and in the course of time a middle position between its total affirmation and its total rejection was suggested. The Book of Wisdom, it was said, is Solomon's inasmuch as it is based on Solomonic works which are now lost, but which were known to and utilized by a hellenistic Jew centuries after Solomon's death. This middle view is but a weak attempt at saving something of the full Solomonic authorship affirmed in earlier ages. "It is a supposition which has no positive arguments in its favour, and which, in itself, is improbable, since it assumes the existence of Solomonic writings of which there is no trace, and which would have been known only to the writer of the Book of Wisdom" (Cornely-Hagen, "Introd. in Libros Sacros, Compendium," Paris, 1909, p. 361). At the present day, it is freely admitted that Solomon is not the writer of the Book of Wisdom, "which has been ascribed to him because its author, through a literary fiction, speaks as if he were the Son of David" (Vigouroux, "Manuel Biblique", II, n. 868. See also the notice prefixed to the Book of Wisdom in the current editions of the Douai Version). [...] All these variations as to authorship prove that the author's name is really unknown (cf. the notice prefixed to Wisdom in the Douay Version).
The "freely admitted" can be understood, in the dogmatic sense, as being permitted within the boundaries of the Magisterium (i.e. not being a heresy).