Fish swim by passing a wave through their bodies. In 1960, Lighthill showed, in some simplified analysis, that in order for a fish to move at speed x, the wave in their bodies has to move at speed (5/4)x.
What is really interesting is that in this analysis, the fish is treated as just a flexible line, what that really means is all the fins, including the tail, are not needed for locomotion. There are a few species of fish that are pectoral swimmers, but most fish use oscillations. In fish, they are side to side oscillations, dolphins use up and down oscillations.
Finally, back to the original question, sure fish can swim backwards. The analysis by Lighthill does not presuppose a direction. All the fish has to do is make the wave travel in the opposite direction along its body.