ECC isn't a direct mitigation against Rowhammer attacks, as memory errors caused by three or more flipped bits would still go undetected (unless you're using ChipKill, but that's a rare setup).
However, flipped three bits simultaneously isn't trivial, and the attempts that flip fewer bits will be detected and logged.
However, flipped three bits simultaneously isn't trivial, and the attempts that flip fewer bits will be detected and logged.