St. Thomas Aquinas
“So, then, this sacrament benefits recipients by way both of sacrament and of sacrifice, because it is offered for all who partake of it… But to others who do not receive it, it is beneficial by way of sacrifice, inasmuch as it is offered for their salvation… And our Lord expressed both ways, saying (Mat. 26:28, with Lk. 22:20): ‘Which for you,’ i.e. who receive it, ‘and for many,’ i.e. others, ‘shall be shed unto remission of sins.'”
Source: St. Thomas Aquinas, Summa Theologica