I certainly know of people who've collected their own wood and not had any problems, although I've never done it myself...
There are apparently a few things you need to take into account when sourcing it. You'll need to make sure it's dead wood for starters, otherwise it'll rot and potentially leach something unwanted into the tank. You'll also need to know what type of wood is ok to use as some can be quite toxic. I don't know what type of wood you have where you are but I've heard oak and beech are apparently proven safe but wood like walnut inc. white walnut shouldn't be used. No idea about any other types though. When you find the wood you want you'll need to remove any bark and look out for any fungus also. Boil it if you can and/or leave it soaking for a while before putting it into your tank.