Hi, griddlebone,
I'm NOT an expert, but in view of previous comments, I'd separate them ASAP, take the loach back or rehome the sunfish.
If there's a Q tank or any suitable tank ready, personally, I'd get one or the other out immediately.
Any seriously bullying or continual harassment will very rapidly run down a fish and make it susceptible to illness, even if it's not injured outright.
The constant stress and fear would be terrible for anyone to suffer - and I've seen firsthand how bullying can wipe out almost half a tank (they were stunted and suffering from a mycobacterial infection, but did quite well up until that point despite deformities) previously managing quite well, so I do speak from painful experience in that area. A healthy fish might last longer - but in misery.
If you provide hiding spots and the loach survives in hiding, what kind of a life will that be?
He's been thrown in a ring with a lunatic bully and the only escape is into the open air to die.
That's my 2 cents, for what it's worth, and with any luck an expert will come on soon, but immediate separation is something I'd strongly recommend.