Confession during Mass is clearly permitted, as it has it the 2002 Motu Proprio Misericordia Dei:
“2. Local Ordinaries, and parish priests and rectors of churches and shrines, should periodically verify that the greatest possible provision is in fact being made for the faithful to confess their sins. It is particularly recommended that in places of worship confessors be visibly present at the advertized times, that these times be adapted to the real circumstances of penitents, and that confessions be especially available before Masses, and
even during Mass if there are other priests available, in order to meet the needs of the faithful.”
The full text is at
vatican.va/holy_father/john_paul_ii/motu_proprio/documents/hf_jp-ii_motu-proprio_20020502_misericordia-dei_en.html .
Also in the 2004 Instruction Redemptionis Sacramentum:
“[76.] Furthermore, according to a most ancient tradition of the Roman Church, it is not permissible to unite the Sacrament of Penance to the Mass in such a way that they become a single liturgical celebration. This does not exclude, however, that Priests other than those celebrating or concelebrating the Mass might hear the confessions of the faithful who so desire, even in the same place where Mass is being celebrated, in order to meet the needs of those faithful.[footnote 158: Cf. Pope John Paul II, Apostolic Letter (Motu Proprio), Misericordia Dei, 7 April 2002, n. 2: AAS 94 (2002) p. 455; Cf. Congregation for Divine Worship and the Discipline of the Sacraments, Response to Dubium: Notitiae 37 (2001) pp. 259-260.] This should nevertheless be done in an appropriate manner.”