Could be an encysted parasite that requires an intermediate host like a bird to eat the fish. Without a host the parasite will never develop so it's harmless to the fish just looks ugly.
Is/was the lump full of pus or is it solid? I had something that looked similar to that near my goldfish's tail once, it was full if pus. All I done was got a small hypodermic needle and tube to draw the puss out, once empty and deflated I dropped bettadine (iodine) on the tissue, and salt bathed daily at a dose of 1 teaspoon per 5 ltrs for half an hour. It was completely gone in 2-3 weeks.. He still has a scar there but he's a happy healthy goldfish now.