Yes, cooked fish is the safer, healthier way to feed a dog fish. But keep in mind that dogs should not be consuming any salts, seasonings, oils, butters, etc. This will cause them to have stomach upset, leading to diarrhea and vomiting.
And while you’re feeding your pup plain, deboned, skinless, cooked fish, remember… everything in moderation! Just give them a small portion from time to time. No bigger than a small handful. And even less if they are a small breed dog.
If you’re not sure what a safe amount looks like, consult your veterinarian. But a good rule of thumb is that any treat for your dog shouldn’t make up more than 10% of their daily diet.