First some context:
18 Children, it is the last hour; and as you have heard that antichrist is coming, so now many antichrists have come; therefore we know that it is the last hour. 19 They went out from us, but they were not of us; for if they had been of us, they would have continued with us; but they went out, that it might be plain that they all are not of us. 20 But you have been anointed by the Holy One, and you all know. 21 I write to you, not because you do not know the truth, but because you know it, and know that no lie is of the truth. 22 Who is the liar but he who denies that Jesus is the Christ? This is the antichrist, he who denies the Father and the Son. 23 No one who denies the Son has the Father. He who confesses the Son has the Father also.
The “THEY” in v19 is talking about “anti-Christs” that is defined in v22 as those who reject Jesus yet pretend to be part of the group. Context is very clear and helpful here. Now look at the start of this chapter:
1 My little children, I am writing this to you so that you may not sin; but if any one does sin, we have an advocate with the Father, Jesus Christ the righteous; 2 and he is the expiation for our sins, and not for ours only but also for the sins of the whole world. 3 And by this we may be sure that we know him, if we keep his commandments. 4 He who says “I know him” but disobeys his commandments is a liar, and the truth is not in him; 5 but whoever keeps his word, in him truly love for God is perfected. **By this we may be sure that we are in him: **6 he who says he abides in him ought to walk in the same way in which he walked.
Note this is talking about the actions of individuals, they must keep His Commandments, you know you are in good standing as long as you keep them. Note John doesnt accuse them of being an anti-christ if they dont keep the commandments. A person can be a member of the church his whole life and later sin and be sent to hell. John mentions the need for us to “keep His commandments” over and over again in this letter.