It is quite true that Paul said that about heresies (divisions): 18 For first of all, when ye come together in the church, I hear that there be divisions among you; and I partly believe it. 19 For there must be also heresies among you, that they which are approved may be made manifest among you. (1 Cor 11:18,19)
So what is Paul telling us? (a) there will be divisions within local churches because some will be presenting heresies and (b) the Holy Spirit will show Christians which doctrines and which teachers are to be approved and which are to be rejected. "There must also be heresies" means that they are to be expected.