Welcome to TFF.
There are two separate issues here. The first is any substance in the water that arrived during the last water change...any additives? Did you use the conditioner? Worth mentioning, but this would likely affect other fish too and I gather this is not the case.
So the primary reason is probably the fact that this species (Pimelodus pictus) is a shoaling fish and it must have a group. It should be kept in a small group of at least 5; single fish may pine away and this is most likely what you are now seeing. The solitary fish is stressed, severely so, and can no longer "hold" this in, so the erratic behaviour. This unfortunately is not reversible, as the fish has been compromised for quite some time and it affects them internally/mentally.
As gouramis are present, I should also point out that tankmates should not include sedate fish like angels, discus, gourami and even cichlids as these will be pestered by the nocturnal habits of this catfish, nor nippy fish like barbs. Medium-sized characins, larger rasbora, rainbowfish are suitable.