ECC fails to prevent rowhammer in more or less exactly the same way that address space randomization and similar hardening techniques fail to prevent stack smash attacks.
Which is to say, it basically prevents rowhammer in a practical sense. You can flip the bits, but you don't have the level of control needed to flip the right bits.