probably the best bet would be to soak it for a while. No idea how long, but mostly I'd be concerned with trying to get as much of the sap out as possible.
It may depend on what type of tree it was, but I don't personally know which trees are considered safe/risky.
Is it small enough that you can fit it into a container and soak it? or have a nearby body of water where you can lash it to something and leave it to soak?