If you are seeing the white granular material in the toilet line, I hope it is not related to the water heater!
Do you have some vinegar? If so, drop some of the material in a small amount of vinegar. If it dissolves and fizzes, it is hardness scale (calcium carbonate). You would need a water softener to prevent this material from forming.
The corrosion product from an aluminum anode rod is aluminum oxide. It also will dissolve in vinegar, but slowly and without fizzing. The best way to prevent problems with this material is periodic maintenance of the water heater.
If the material does not dissolve in vinegar, it likely is sediment from the water source. A "whole-house" sediment cartridge filter would help.