Yes the upright Vacuum cleaners with the rotating brush can scratch up hardwood floors so you should turn off the brush portion if possible to avoid scratching the floors.
Or use a shop vac with a brush attachment that doesn't rotate to avoid scratching the hardwood floors.
The Shark Rotator Powered Lift-Away Vacuum cleaner is a good Vacuum cleaner for cleaning hardwood floors without scratching them.