Cyclists may use all roads in MA except limited access or express state highways where signs prohibit it. I do not know if Rte 9 is an express state highway or not, but in any case I don't ride on it as there are lots of safer alternatrives. You should be able to avoid Rte.9 in Newton or Brookline, depending on your destination.