Yeah, wood is hard to tell what it might be. Most is safe but softwoods like pine never sink & need to be attached to slate etc. Yew is bad as are a couple others I don't remember (eucalyptus?). There was a site I saved about aquarium woods when I found a nice piece in a local reservoir but I can't find it years later. The log I found had some soft areas I removed. It smelled sweet like a fruitwood (mostly safe AFAIR). After I cut off all the rotten wood there wasn't a nice big log left, just 2 ~10-12 inch pieces. I was too nervous to use them...
I tried cork wood as a background once & some had lichens, a nice patina I thought. It spiked my ammonia level for quite a few months. I asked here & on other sites & it seems lichens can do that. I scubbed them off, ammonia went away...but eventually it was a failed experiment. The cork broke down enough to detach from the caulking & slate...sniff, it looked so cool!
Can you soak the wood in a big plastic tub & test, say, once a week or 2? But that only shows the "easy" parameters, nothing that may be fish toxins...A sacrificial test fish in the tub? I'm not sure I'm comfortable with that method. When in doubt, leave it out is kind of my motto...but it is a nice piece...