If there has been work done by a utility company or a plumber in, or near to your home then the supply can become contaminated. It is best to run the water for a while through the taps in your home before using the washing machine.
The tub of the machine is plastic and the drum is coated in stainless steel so it is unlikely that your machine is rusting inside.
Rust stains can be removed by covering it in salt and then rubbing with lemon juice. Rinse thoroughly before washing again.