Depends on the wood....generally speaking, soft woods aren't preferred in a tank as they can break down rapidly and foul the tank. More importantly, getting wood that could pose a poisonous threat is very important to avoid. I don't like to use pine or eucalyptus as the sap and tannins could pose a threat to the fish. There are schools of thought to the contrary however...old bogwood that has had time to break down in nature...some recommendations like boiling...all say that the natural soft woods are okay.
I would error on the side of caution and do everthing possible to neutralize the chance of the wood becoming a contamination in your tank. Properly soaking and cleaning the wood....boiling it if possible. Do diligence is very important when introducing a foreign variable in your closed ecco-system that is your aquarium.
If the fish are from the same source/waters as the decor you collect, the prep should still be the same...soak, soak and soak some more. Scrub and clean....use good judgment.
Hopefully others here will chime in. Don't just take my word for it....
If you know exactly what the wood is it would be helpful for people to comment.
I have used wood that I collected in a natural environment and been ok....others not so lucky.