Driftwood is a natural product - wood from a tree. When it is dead - the tree, that is - the wood will deteriorate - rot - just like all other bio material does. This is nature's way of recycling.
Driftwood, when it breaks down can add waste to your tank, and often, if your kH is not high enough, can cause your pH to drop.
Driftwood can be beautiful and very nice for many tropical fish to hide in. I do not feel it is necessarily one of the best choices for goldies, though. But then I am a minimalist in my goldie tanks, so.....that colors my comments.
If the driftwood you have has already broken down to the point where pieces are mushy and breaking off, then I do not think you should put it back in a tank.
There are beautiful pieces that are made to look like driftwood - if you select carefully you will only have to do the minimum of filling and sealing on them, and, once done, they last for practically forever. You acn also start a new piece of driftwood by boiling it clean. Select only pieces that are meant for underwater - not reptile tanks.