Using hardware store dowel as rolling pin?
Assuming that the wood is untreated (ask the store!), you can use whatever you find in the wood isle.

There are very few woods with questionable compounds that might leech undesirable substances, but neither is a typical mass market material. And even for woods like yew or oak, the amount of tannins or other is extremely tiny if used as rolling pin. I would hesitate to store wet or humid food in an oak bowl, though, unless I'm aging wine.

Try to find a hardwood dowel, pine and its relatives are rather soft and dent easily. Not a problem if you need a quick substitute, but if you want to use it as rolling pin for years, probably less sturdy. Also, make sure you pick something resin-free, especially if you have fluctuating temperatures in your kitchen.

Before you use the wood for the first time, clean it well, note that it was neither produced nor stored in necessarily the cleanest of enviromements. Then after it's dry, check for splinters and loose wood fibers. You might want to give it a quick wipe with sanding paper to get rid of them or they could make your dough stick to the pin. You might also want to go along the edges of the ends, to be sure nothing can hurt you during use.

For long-term use or to further reduce sticking dough, you could season the pin with a light coating of oil, like for chopping boards. Find more on that procedure here. After that, the grease in your doughs should suffice to maintain the wood.