I think we should try to avoid harming things that can experience suffering. So we can apply rules differently based on the kinds of suffering the animal is capable of—a fish can feel pain, so we should try not to hurt it physically, but (as far as we know) it doesn’t have the capacity to understand things like injustice, so keeping it in a tank (with a lot of food and friends) is probably ok.