What method did you use to remove it? If it was Manage Fish and you put the dead fish in your inventory, it's very possible that you could put it back into the tank as a live fish. Your personal inventory doesn't distinguish between a dead fish and a living fish. However if you used Scoop Out Dead Fish, the fish is just gone. Not in your inventory or anywhere else.