Unequal sample sizes, if not extremely different, pose no problem for anova. If the sample size in some treatments is extremely small, the test will be inappropriate anyway. If you could specify the context better, it would be easier to help. Today, programs often include an option for testing hypotheses with unequal sample sizes, so you might look into that.