Most softwoods like cedar and pine will leach sap and resin into the water - yucky and possibly even toxic. A really old weathered piece might be OK, but if it's fairly fresh, and still smells of cedar, dont use it.
Better woods are hardwoods like Oak, but again you want an old dead weathered piece thats been sitting around for a while. The commercial driftwood sold in the pet stores may cost a few $$, but the wood type has been chosen so it's safe and durable.
Cheers
Ian