If your fish shows sing of disease, like swimming sideways, shows any signs of shock, like bumping on to rocks or the aquarium wall, or shows any abnormality on its fins, like fungus, or growth; then I am sad to say, yes it is about to die.
Only very few fish survive the conditions above. Fish are very delicate, and die very frequently in captivity. With appropriate care, appropriate temperature monitoring, appropriate water PH balance regulation, a suitable sized aquarium and a suitable filtration system, fishes in captivity can last a much longer period of life.
Fish keepers should always keep a small collection of basic "fish care" technique books, with all kinds of pictures and illustrations about their diseases and their species; along with information on how to treat all those situations.
When it all comes down to it, every living thing will die one day.