It would do no harm to make up a new container, fill with cold water, let it stand a while to take the chill off, then net the survivor and put it in the clean water.
Now the container will depend on the size of the fish - as long as it holds water it can be anything from a proper tank to a clean bowl - if you use a plastic bowl it's best to buy a new one and rinse it well foorst, you don't want any traces of detergents in there.
It might be that the critters time is up, but separating the living and the dead is a good move. Whatever killed the one might be in the exisitng water - over-feeding is a key culprit - if you can see any food not eaten that's a clue. Don't feed the survivor for a day - they can go ages without food.
If they both peg it it's a shame, but it would be a kind gesture to buy a little fish replacement - not if it's a huge expensive one, they'll be insured for that....
Don't use the water, grit or weed from the old tank and clean all tank decorations before reusing