If an unrooted Android device is infected with a virus, rootkit or malware, would resetting the device disinfect it?
A factory reset will reset back to the state the phone has set as last known good image, and for most compromises that will be sufficient.
But if that image infected then no, it will not help. I have had one android phone delivered from the factory with malware already installed, so I was concerned that I would need to provide a known good image, but a factory reset was enough in that instance - so the compromise was obviously in an application rather than core os or firmware.
So if you want to be safe, grab latest firmware image from a reputable source and use that. Just in case the reset doesn't clear the malware.