the standard disclaimer always applies; check local laws before collecting, even dead "thiings" from teh beach. Some places discourage beach collecting because the nefarious types will dive to collect and claim they "found it on the beach". So, if it IS ok to collect, you should be fine but be sure anything you collect is cleaned throughly (without any bleach or solvents) before putting into your tank. The risk of pulutants is completely dependent on the beach itself. Some are cleaner than others. But there is always risk of disease or other harful critters ending up in your tank.
Check the laws, use caution when choosing and cleaning, and you should be ok.