My son looks like he has dandruff but the dandruff won't wash off. Are they nits?

Can be. Nits look like tiny pearls stuck to the hair. They tend to be located at a uniform distance from the scalp & are hard to separate from the hair without a special nit comb.
Possibly. Dandruff is flakes of skin, so should wash off. If it does not, it certainly can be nits, as these are the egg casings of head lice and are glued to the hair shaft. If his head itches, or other signs of irritation, it should be checked out. Headlice are very infectious!