My largest barb flashes against the roots & branches in my tank (seemingly) when displaying aggression.
None of the others do it and she's been doing it for years, I know there's nothing wrong with my water parameters and they do not have ich.
It could be mating behavior or dominance behavior, I have no idea, but it is not always a sign of parasites.
If ALL of your fish display flashing at once then I would say you definitely have some type of parasite issue. Fish flash to "scratch" against things when parasites are making them uncomfortable (after all they have no hands to reach the itch).