is it okay to use shredded zucchini that smells a little sour for baking
Fresh zucchini has a fairly neutral or sometimes "greenish" smell. An acidic or vinager-like smell is an indication of some kind of fermentation that has set in. 

We can't say what exactly has started to grow (there is lacto-fermentation, which is typically induced on purpose, but also a good chance that your zucchini simply started to decay), but even if it were benign, the sour taste would remain present and likely prominent in your cake, so don't use the zucchini.

Always remember:
"If in doubt, throw it out!"