Hours are hours. You're not a hostage of the school, you can fly whenever you want whereever you want.
What you can't do is use hours gained outside the program to count for credit inside the program. So, for instance, working on your Instrument via Part 141, you still have to meet the program's requirement for hours in their airplanes with their instructors. You can't short-cut it.
However, that's not much of a problem. Where it becomes a big problem is if you were to do your Commercial via Part 141. A Commercial 141 program requires 120 hours of flying within that program, so no "extracurricular" flying would count towards that. In other words, you can't save money by flying in your buddy's 150 for some of those hours. But if you do your Commercial via Part 61 (as you say you're going to), then hours are hours and it doesn't matter where you got them.