2 “Jesus,” therefore, “was troubled in spirit, and testified, and said: Verily, verily, I say unto you, that one of you shall betray me.” “One of you,” in number, not in merit; in appearance, not in reality; in bodily commingling, not by any spiritual tie; a companion by fleshly juxtaposition, not in any unity of the heart; and therefore not one who is of you, but one who is to go forth from you. For how else can this “one of you” be true, of which the Lord so testified, and said, if that is true which the writer of this very Gospel says in his Epistle, “They went out from us, but they were not of us; for if they had been of us, they would no doubt have continued with us”? Judas, therefore was not of them; for, had he been of them, he would have continued with them.
What, then, do the words “One of you shall betray me” mean, but that one is going out from you who shall betray me? Just as he also, who said, “If they had been of us, they would no doubt have continued with us,” had said before, “They went out from us.” And thus it is true in both senses, “of us,” and “not of us;” in one respect “of us,” and in another “not of us;” “of us” in respect to sacramental communion, but “not of us” in respect to the criminal conduct that belongs exclusively to themselves.
Source: Tractates on the Gospel of John (New Advent)