Can we avoid formaldehyde in adhesives by choosing hardwood flooring that is nailed into place?
The answer depends on your subfloor material and the product you’re installing.
If you have a plywood subfloor, solid hardwood flooring is typically fastened by nailing or stapling. (It’s less common nowadays to use screws.) A small number of flooring products are both nailed and glued to a plywood subfloor. It's best for indoor air quality to avoid using adhesive, but if you need to, you can use an option such as EcoTimber Healthy Bond, a resin-based product that has only 7 g/L of VOC. If possible, you can go the extra distance and choose a formaldehyde-free 3/4" plywood substrate.
If your subfloor is concrete, you may want to use a glueless engineered hardwood system instead of solid hardwood. These systems are fastened from the baseboards—a technique called "floating"—and no nails or adhesives are necessary.