Let's say you had a fish analogy organism in the oceans of an alien world. Assuming it's ancestry allows for more the number of limbs, would it be possible for it to have one set of fins for swimming and another folded away for flight?
This has already happened on your home planet. Long long ago, fish crawled onto land and evolved into birds. Those birds then learnt to swim underwater. They have two sets of fins (Shag Cormorant). The bottom fins (red) are used for swimming and the top fins (blue) are used for flying. When not in use, the respective fins are tucked away. Some birds (Gannet Dipper) use both sets of fins for swimming.
It is a sound principle. But is it a sound evolutionary strategy for an animal that spends most of its time underwater rather than a bird that spends most of its time on land?
You see the wings cost energy to maintain. But they also cost energy to use. So the fish must have a reason to fly in short bursts rather than just swimming everywhere. I suggest your world has inaccessible islands that the fish roost on to escape from predators. And those islands need water on them so the fish don't suffocate. Or maybe the world has isolated pools of water for the fish to fly between. And rugged terrain in between so the fish grow wings instead of legs. Not just a boundless ocean world with flocks of bird-fish flying about. That would be silly.
We already have that on earth, it's called a flying fish. The flying fish has two wide fins that help them to glide above the water for up to 650 feet. However, these fins seem to serve little to no purpose when under water as the fish tucks them to their side when beneath the surface. Being a fish however, it obviously does have other fins that give it maneuverability and speed under water.
So I would say it is very possible as it already exists.