It depends on how you cook it. The whole fish needs to reach a temperature of 65ºC enough time to be safe, so cooking it on a grill or a griddle won't do.
If you have a freezer suited to freeze fresh food (four-star), like most people do, freezing the fish by yourself before cooking it is safer than just cooking it.
The required temperature for cooking is lower than what is required for most other meats, so there really shouldn't be a problem with pretty much any cooking method.
As for the freezer, a typical freezer is set to 0F which is a bit higher than the FDA recommends and again, freezing in a home freezer will harm the texture of the fish. If you are paranoid about parasites, don't buy fresh. Overall, is it safer to freeze fresh fish beforehand? Sure, but its safer to eat well done meat than medium meat. Either way, if you are cooking your fish correctly there shouldn't be a problem if you don't freeze it. Buy a meat thermometer if you aren't sure how long to cook your meats/fish.
I can't recommend freezing your fresh fish in your home freezer under pretty much any circumstance. Again, if you aren't planning on cooking the fish to the recommended temperature or you plan to store it, buy frozen (and even if you aren't, you should probably buy frozen).