Our salespeople . . . may provide . . . trading strategies to our proprietary trading desks that reflect opinions that are contrary to the opinions expressed in this research.
[O]ur proprietary trading desks and investing businesses may make investment decisions that are inconsistent with the recommendations or views expressed in this research. (Source: Goldman Sachs general disclosures)
So would an investment bank trade against its customers? Yes. Many strategies are exactly this. For example, when index funds need to rebalance, one trading strategy is to push down share prices before they sell and buy back as they sell. It doesn’t matter if the bank is also selling its customers one of the victimized index funds. Or consider many high-frequency strategies which exploit small predictable movements in share prices, movements which might be generated by the very funds and strategies that the bank is selling to other customers. And here customers can be those buying currency hedges, swaps to insure, or anything. And it would not be illegal if the process by which these trades occur happens not to be a closely guarded secret within an investment bank (information on the timing of such trades would be illegal were it being shared within the bank).
So, yes, I favor splitting selling investments and investing. The problem is, as always, how to do it cleanly with minimal compliance costs and disruptions.