The hardwood / softwood is not as simple as how hard the wood actually is.
Balsawood is a hardwood, while there are many species of "softwood" that are harder than many "hardwoods".
Some to avoid are Cedar and pine, which do tend leach various oils, many of which are toxic. Cedar is such a long lasting wood because it contains so many oils that toxic to bacteria, fungus and bugs. But also probably fish.
Walnut is also a risk as it contains Juglone which is toxic to many plants and animals.
BUT most hardwoods are safe, oak should be fine. The older and more weathered the piece is, the safer it will be.
My 55gal has 5 pieces of "wild caught" driftwood in it. I'm not even sure of the species, but I've had no problems.
Ian