Well even without the fish moving itself it wouldn't be a perpetual motion machine because the running water would be an input to the system. Agree though that a living, untethered fish would need to expend energy to stay balanced and in the right spot.
Reframe the system to the moving water and put a watermill or a hydroelectric power plant in there in there - perpetual motion and extracting energy. A flowing river is not a closed system.