You neighbor is mistaken, as layer feed will not prevent hen's eggs from hatching. In fact, giving hens layer feed will not harm eggs, and can even help eggs hatch, as it ensures strong shells that aren't too porous.
If you look on the label on a bag of feed, you can see the percent calcium, protein, salt, fiber, and many other things. The only two that significantly change are protein and calcium. The only significant difference in any of them other than Layer is percent protein. There may be minor variations in the other stuff but those are not significant. The percent protein is what makes them Starter, Grower, Developer, Finisher, Flock Raiser, Game Bird Starter and all that. The rest of the stuff doesn’t really matter.
The only difference in Layer and the others is calcium, other than the protein differences they all have. All the others should have a calcium percent somewhere around 1%. Layer should have calcium somewhere around 4%. These calcium per cents can be off just a bit but not significantly. So yes, the only real difference in Layer is the calcium.
Feeding them Layer instead of Grower, Flock Raiser, or something else will not prevent the eggs from hatching. They need extra calcium for the egg shells. That can come from Layer or you can feed one of the others and offer oyster shell on the side. It really doesn’t matter.