It doesn’t have to be an either/or. When asked about His betrayer, Jesus might well have said, “The person I give this bread to, and who dips the bread in the oil with me, is the one.” He might even have said more than that, in addition, additional comments that weren’t recorded. Matthew was only interested in recording what he quoted from Jesus, and John was only interested in quoting what he quoted from Jesus. If you asked John about Matthew’s quote, he might easily have answered, “yes, He said that too.” This is one of many cases in the Bible where one can say to oneself, “There might be a contradiction here,” but cannot prove that a contradiction exists. Therefore it would serve as only a weak argument against the infallibility of scripture.
This said, there are a tiny handful of places in the Bible where there is an error. For instance, one or two points of chronology in the books of Kings or Chronicles are inconsistent with one another or history. A very, very small number of real errors exist. The Church says that in such rare cases as this, we should believe that this is the result of a translation error along the way, and not an error in the original manuscript. Humans can tamper with Bible manuscripts by accident or deliberately, but in its original form, the Bible is the Word of God, with God as its Author, and consequently it has no error.