As all my colleagues here have said, both Ashland and Franklin are terrific towns with great schools and low crime rates! I think you will enjoy visiting one of my favorite links www.massstats.com (four "s's" total) to do your own research. And, yes, just by residing in either one of these towns (or any town in Massachusetts) your children are automatically entitled to attend school in that town. You may have to contact the school department to register your child(ren) however.
I am curious, however, how you have narrowed your search down to these two towns. They are not in close geographic proximity to each other and they both offer very different town amenities. Again...I'm just curious!
Good luck...you are on the right track by using TRULIA as a resource! I personally love it!