If you don't want to go to all the work of correcting the drywall , yet don't want nail pops, then avoid putting pressure on the drywall. You can do this by predrilling your nail holes (including a tiny countersink for the finish head)in the chair rail so that the force of hammering doesn't cause the chair rail to drive the drywall back. Try to get the rail just up tight to the wall without forcing the drywall back. I think fewer, larger nails would work better. Even better would be predrilled and countersunk screws, if the heads aren't a problem. Easier to draw the rail up to just touching the wall but not pushing in the rock.