As far as I understand, the issuer of an ETF following S&P 500 should hold shares of the 500 companies included in that index. So, when company A goes out of the index and company B goes into it, the ETF issuer should sell all shares of A and buy shares of B instead.
Suppose an investor knows that such a change is going to happen. He can take advantage of this knowledge by bidding to buy many shares of A in a low price and to sell many shares of B in a high price. Since the ETF issuer is obliged by regulations to sell A and buy B, it might have to accept the investor's unfair prices.
Is this scenario possible, and if not, what is done to protect against it?