Aggregate utility has some valuable applications, like progressive taxation, the idea that higher incomes are taxed at a higher rate, because they are mostly used to purchase luxury goods and items, so that lower income people don't have to sacrifice the essential in order to pay taxes.
We can see here, a minority being imposed a small sacrifice (no third mansion or fifth sport car) while the majority enjoys a substantial gain (being able to afford shelter, food and clothes), with an intended net positive aggregated value.
Progressive taxes are applied and generally accepted all over OECD, and when contested it's mostly with other arguments based on aggregate utility like trickle down economics.
So what is the difference with your - obviously unacceptable - example?
I don't think it comes from the ability to measure utility. Although the monetary values of tax payments can be compared more easily than the utility variations for Emma and the sadists(*), the actual utility gained from spending that money poses the same problem: how is my third mansion compared to you having food on the table every day?
There is of course the disgust, the moral intuition most people would have that what happens to Emma, or the surgery patient in Dcleve's example, is wrong. But utilitarianism precisely aims at offering a rational approach to decision making and not relying on this feeling, so the argument is inoperant in this context.
Probably the main issue is that very few people would accept to be in Emma's position in your situation B. The same goes for Dcleve's surgery though experiment. Although I can perfectly see myself in the position of having 2 mansions and begrudgingly give up on the third one, I definitely refuse to be raped all my life or dissected alive, however great the benefit for others could be.
If I can't see myself or my loved ones on the losing end of the bargain, then by either Kant's moral imperative or social contract theory I can't expect others to take this place for my sake. Or, in reverse, approving of Emma's situation would put us in a situation where we would have to agree to take her place. Hence our reluctance to this scenario.
What we are seeing is that, although utility aggregates can be a valuable tool to argue that a given maxim can be made universal (Kant) or that a given policy can obtain a consensus (social contract), we see that by itself it's not enough to account for our moral sentiment. We have to assume an underlying moral basis that will help us establish if the sacrifice is acceptable.
(*) nice punk rock band name, thought