Yes, that internal hard drive is bad (both worn out & failing). There are 11 Reallocated bad sectors so it has just started to fail.
The Load Cycle Count is also very high at 1.5M which is about double what most manufacturers expect. In my own personal experience when the Load Cycle Count exceeds manufacturer's expectations, hard drives start to perform poorly & may even have odd issues. Combined with the bad blocks, this can easily slow the computer down to a crawl.
Unfortunately with the iMac's, it is difficult to replace the internal drive. Usually people find it easier to just attach an external USB3 SSD and install macOS on the external SSD. This should still give a performance boost over a traditional slow spinning hard drive which your iMac has been using.
After getting your external macOS booting & working properly with all your apps & files and after making a good backup of the new system, I would suggest erasing the internal hard drive because you may end up accidentally storing a file on it & you may not notice. Plus I've seen macOS sometimes launch apps from the old drive instead of the new drive (usually from a cloned system though). Don't erase the bad internal drive until you are absolute sure you have all your documents on the new drive.
And to prevent the old internal drive from always showing up as a storage location, you can follow the instructions in this article written by a respected forum contributor to prevent the automatic mounting of the old bad internal drive. It can still be mounted manually if desired.
Prevent a volume from mounting at startup - Apple Community