A .223 will be pretty hard on the squirrels, but will kill them deader than dead. The big benifit to the .223 is inexpensive ammunition. As far as the barrel length I wouldn't get to worked up about it. I have a .223 with a 22 inch barrel and have never felt it was to short. It could be just a touch louder than a 24 inch barrel but it doesn't matter, as you need hearing protection when shooting a 223 anyway.
One word of caution, varmint hunting sometimes requires long hours looking through you rifle scope. Buying a good scope up front will go a long way to more enjoyable day of shooting.
longwalker