It is highly advisable to feed your dog with fresh water and strictly avoid saltwater. This is because drinking salty water can cause hypernatremia. This makes your dog go more thirsty, it becomes weak, signs of irritation will be seen and nausea. Excess consumption can cause death.
If you are out on the beach you need to carry some freshwater that you can give to your dog rather than letting it drink from the seawater or other sources.