The definition of a "teaching hospital" is nebulous. I think most people would agree that hospitals that are have the words "County," "VA," or "university" in their titles would qualify. On the other hand, plenty of private, for-profit, community hospitals host residency programs (does this make them "teaching hospitals"?). Also, plenty of community hospitals are "university affiliated," whatever that means. To complicate matters, in a given urban area, pretty much any practicing physician tends to get some sort of academic title handed to them, whether or not they ever set foot on the medical school campus. "Assistant Clinical Educator/Professor" is a common one. Does this make the hospitals in which they work "Teaching Hospitals"? Anyway, so when you say non-teaching hospital, you could mean a lot of different things.
As for learning on rotation, I can tell you that I've rotated thru a number of teaching hospitals and a number of private, community hospitals, and I've found the teaching to be better at the privates, almost universally. I think this is because the physicians tend to be less burnt out on teaching (cuz they likely make more money, work fewer hours, do less uncompensated research, and teach less). Also, the # of students around tends to be less, so there's a lot more physician:student 1-on-1 time. You tend to be more of a novelty, and people want to show you interesting things.
On the other hand, you need letters from academic dept. chairs and people who are known in the places you want to go. Lame, I know. So, to answer your question, if you know you need a letter, I guess you need to rotate thru a place that has "university" in the title. If you want 1-on-1 time with staff, go private. In something like IM, you could certainly do your intro rotation somewhere private and your sub-I at the U hospital.