Clearly, he is not saying that these people had no need for someone to teach them the difference between truth and error. They did need it! That is why John wrote his epistle! What they did not need was for anyone to teach them the church's basic doctrines, nor did they need human logic or philosophy to help them understand God's nature.
John had known, seen, heard, and touched Jesus Christ personally. Christ had taught him intensively for three-and-a-half years, and in turn, the aged apostle had taught them the same truth throughout his own ministry. The members of God's church had no need for any heretic to teach them.
As true sons of God, they had received His Holy Spirit, which had opened their minds and led them into the truth (John 16:13). They had been thoroughly grounded in the truth regarding the nature of Christ and God and the very purpose of life itself. God's truth had not changed, so what need did they have to relearn it?
In the rest of I John 2:27, John encourages them to allow the Holy Spirit to lead them and keep them faithful to what they had been taught from the beginning. Their original knowledge was true and no lie: "But as the same anointing teaches you concerning all things, and is true, and is not a lie, and just as it has taught you, you will abide in Him."
Do we need teachers? Of course! John's epistle is an excellent example of why teachers are needed in the church. When false doctrine threatened members of the true body of believers, John found it necessary to spell out to them the dangers in it, even though the brethren had been thoroughly grounded in the truth. To reassure them that their foundational beliefs were true, he felt he needed to explain the truth to them again. He also saw that they could use some encouragement to trust the Holy Spirit to lead them into the truth.
This is exactly what a true minister of God is to do! The author of Hebrews instructs us to respect the ministry because they are given to us to protect us. "Obey those who rule over you, and be submissive, for they watch out for your souls, as those who must give account" (Hebrews 13:17).
Many New Testament examples show us our need for teachers. Philip's experience with the Ethiopian eunuch clearly illustrates how we need experienced and educated teachers to explain and expound the Word of God (Acts 8:26-38). As Philip approaches him, the eunuch is reading an Old Testament prophecy that foretold Christ's sufferings. When asked if he understands the passage, the eunuch has the humility to admit he needs help. He replies, "How can I, unless someone guides me?" (verse 31). Philip then explains to him how this prophecy was fulfilled in the suffering and death of Jesus of Nazareth. This results in the eunuch's baptism (verse 38).
In dealing with the many problems in the Corinthian church, Paul had to send Timothy to refresh them in the truth that Paul had preached.
Therefore I urge you, imitate me. For this reason I have sent Timothy to you, who is my beloved and faithful son in the Lord, who will remind you of my ways in Christ, as I teach everywhere in every church. (I Corinthians 4:16-17)
In his letters to Timothy, Paul instructs the young evangelist about various principles that he should teach the people. "These things command and teach.... Teach and exhort these things" (I Timothy 4:11; 6:2).
In addition, the apostle tells him to train others to be teachers. "And the things that you have heard from me among many witnesses, commit these to faithful men who will be able to teach others also" (II Timothy 2:2). Besides this, an elder must be "able to teach" (I Timothy 3:2). The very purpose of the ministry is to help in perfecting the saints (Ephesians 4:11-12, KJV).
Throughout the New Testament, God continually emphasizes the need to provide spiritual food to the church. Jesus says that His servants will be providing "food in due season" to His people (Matthew 24:45). "Feed My sheep" is one of the last things Jesus tells Peter (John 21:17). Paul writes to Timothy, "Preach the word! Be ready in season and out of season. Convince, rebuke, exhort, with all longsuffering and teaching" (II Timothy 4:2).