Yup, they used MIPSpro compiler but it cost extra. And my recollection was that gcc wasn't fully functional without MIPSpro installed.
You didn't get the system include files without having the compiler so, yes, gcc wasn't a full solution. Also missing without paying extra was troff so I had to use groff just to be able to format man pages (they mostly came preformatted).
It wasn't free for universities, but in the first half of the 90s, SGI offered so-called "Varsity" contracts, which was basically a campus license for OS updates and unbundled products like compilers, NFS/YP and the "Documenter's Workbench" (a fancy name for troff/nroff).
That was not the case when I used Irix (commercially), or later when I worked at SGI. Perhaps you mean "Son of SGI", the company that once was Rackable Systems?
Sun did the same thing on Solaris (charging extra for the compiler).