I agree that beach shells should not be put into a FW
tank. Rocks, on the other hand, it depends on what kind of rock it is. I have many rocks I found on the beach in my tanks. Any inert type of rock (granite, slate, shale, sandstone, basalt) is fine in a freshwater tank. Limestone, marble, dolomite, coral skeletons are not. If you are not sure what kind of rock you have, post a pic of it and we'll see if someone here can ID them. The rounded, dark gray or black "beach rocks" you commonly see are usually basalt and are fine in tanks, I have several in my 10 planted tank right now. But be sure you know what you have!
If you find a suitable rock from anywhere, you can boil the rock to kill most critters or spores that you don't want in your tank. Alternatively you can bake the rocks in the oven, I've done 200F for an hour. It doesn't have to be super hot, just hot enough to kill anything living.