yes, it would be ok, but let it soak in water in something like a plastic tote for a month first so that you wouldn't have too much tannins in your aquarium. I had an extra 125 gallon aquarium, so I used that. If it's small enough, boil it first.
This is the preferred option. I would recommend some sort of bleach water soak as well to kill organisms found in the wild that you do not want in you tank. Then treat the wood with dechlorinator to remove the effects of the bleach.