Here's Pius IX rejecting the notorious heresy that Protestants can be saved.
Pope Pius IX, Quanto Conficiamur Moerore (# 7), To Bishops of Italy, 1863: "Here, too, our beloved sons and venerable brothers, it is again necessary to mention and censure a very grave error entrapping some Catholics who believe that it is possible to arrive at eternal salvation although living in error and alienated from the true faith and Catholic unity. Such belief is certainly opposed to Catholic teaching."
Pope Pius IX, Singulari Quidem, To Bishops of the Austrian Empire, March 17th, 1856: "[...] The Church clearly declares that the only hope of salvation for mankind is placed in the Christian faith, which teaches the truth, scatters the darkness of ignorance by the splendor of its light, and works through love. This hope of salvation is placed in the Catholic Church which, in preserving the true worship, is the solid home of this faith and the temple of God."
Pope Pius IX, Nostis et Nobiscuм (# 10), To Bishops of Italy, Dec. 8, 1849: “In particular, ensure that the faithful are deeply and thoroughly convinced of the truth of the doctrine that the Catholic faith is necessary for attaining salvation. (This doctrine, received from Christ and emphasized by the Fathers and Councils, is also contained in the formulae of the profession of faith used by Latin, Greek and Oriental Catholics).”
Pope Pius IX, Singulari Quadem, 9 December 1854: "...let us hold most firmly that, in accordance with Catholic teaching, there is 'one God, one faith, one baptism' [Eph. 4:5]; it is unlawful to proceed further in inquiry."
Pope Pius IX, quoted by Fr. Michael Müller: "In his Encyclical Letters, dated Dec. 8, 1849; Dec.. 8, 1864; and Aug. 10, 1863, and in his Allocution on Dec. 9, 1854: Pope Pius IX. says: "It is not without sorrow that we have learned another not less pernicious error, which has been spread in several parts of Catholic countries, and has been imbibed by many Catholics, who are of opinion that all those who are not at all members of the true Church of Christ, can be saved: Hence they often discuss the question concerning the future fate and condition of those who die without having professed the Catholic faith, and give the most frivolous reasons in support of their wicked opinion . . . . .""
In line with the constant teaching of the Church:
Vatican Council I, Session II, Profession of Faith, January 6th, 1870: "This true Catholic faith, outside of which none can be saved, which I now freely profess and truly hold..."
Pope Innocent III, Fourth Lateran Council, Profession of Faith, 1215: "There is indeed one Universal Church of the faithful, outside of which nobody at all is saved, in which Jesus Christ is both priest and sacrifice."
Pope Boniface VIII, Unam Sanctam, 1302: "Urged by faith, we are obliged to believe and to maintain that the Church is one, holy, catholic, and also apostolic. We believe in her firmly and we confess with simplicity that outside of her there is neither salvation nor the remission of sins, as the Spouse in the Canticles [Sgs 6:8] proclaims: ‘One is my dove, my perfect one. She is the only one, the chosen of her who bore her,‘ and she represents one sole mystical body whose Head is Christ and the head of Christ is God [1 Cor 11:3]. In her then is one Lord, one faith, one baptism [Eph 4:5]. There had been at the time of the deluge only one ark of Noah, prefiguring the one Church, which ark, having been finished to a single cubit, had only one pilot and guide, i.e., Noah, and we read that, outside of this ark, all that subsisted on the earth was destroyed.... Furthermore, we declare, we proclaim, we define that it is absolutely necessary for salvation that every human creature be subject to the Roman Pontiff."