The belief that only Catholics go to heaven was always taught and accepted and confirmed by more than one council. The Church no longer teaches this.
This statement is not true.
" There is but one universal Church of the faithful, outside of which no one at all is saved." ."
(Pope Innocent III, Fourth Lateran Council, 1215 A.D.
" We declare,say, define, and pronounce that it is absolutely necessary for the salvation of every human creature to be subject to the Roman Pontiff."
(Pope Boniface VIII, the Papal Bull " Unam Sanctum", 1302 A.D.)
" The most Holy Roman Church firmly believes, professes and preaches that none of those existing outside the Catholic Church, not only pagans, but also Jews and heretics and schismatic’s, can have a share in life eternal; but that they will go into the eternal fire which was prepared for the devil and his angels, unless before death they are joined with Her. and that so important is the unity of this ecclesiastical body that only those remaining within this unity can profit by the sacraments of the Church unto salvation, and they alone can receive an eternal recompense for their fasts, their almsgiving, their other works of Christian piety and the duties of a Christian solder. No one, let his almsgiving be as great as it may, no one, not even if he pour out his blood for the Name of Christ, can be saved, unless he remain within the bosom and the unity of the Catholic Church."
( Pope Eugene IV, the Papal Bull " Cantate Domino", 1441 A.D.)