Had one of my bass do a similar thing on a spiky piece of wood I had in my tank. I've since removed that piece and purchased a more smooth display piece.
As the others have mentioned, keep up the water changes. Good water quality healed mine up fast.