I've been told by a colleague that you can only buy a Japanese Rail Pass outside of the coutry as a tourist. Is this accurate, or is it possible to purchase say, a 2-3 week one in Tokyo?
Your colleague is correct. According to the official Website:
A JAPAN RAIL PASS cannot be purchased inside Japan. You must purchase an Exchange Order from an authorized sales office or agent before you come to Japan.
You need two things to get a JR pass: the Exchange Order, only available outside Japan, and a passport with a Tourist visa in it. Anyone can buy the Exchange Order - the actual pass is produced when you are in Japan. One train pass per passport.
You need to take at least 3 long-haul Shinkansen trips per week for the pass to pay for itself. While you can use it on JR routes in any city those trips are typically under $2 to start with. You can't use it on non-JR lines.
You need to choose the duration of the pass before you buy it, but you can choose any start date you want. Write it clearly on a note and hand it to the counter staff with the note on top, or they will process it starting today before you have finished saying Hello.
It is important to know however that you have to have a tourist visa or come from one of the countries and regions for visa exceptions: http://www.mofa.go.jp/j_info/visit/visa/short/novisa.html. It's almost 70 countries now, including USA, Australia and most European ones, so by presenting one of these passports you should have no problem.
For the rest of the countries, Japanese Immigration Laws have a strict policy, which regards the Temporary Visitor visa as the only valid one to receive and use the Japan Rail Pass. Be aware as there are other types of visas, allowing for a short-term entry but are not eligible for the Pass. There is more about eligibility here.
It depends what exactly you mean by "outside of Japan". The intent of the policy is that you should buy it in your home country before leaving for Japan, but the policy was put in place before the advent of this wonderful (?) thing called the Internet.
So in effect the policy is that you must buy the exchange order from a seller which is based in a country other than Japan. However, many sellers now operate online: you order the exchange order from their website, and they ship it to you through the mail. And there is nothing stopping them from shipping it to an address in Japan, which most if not all of them do, so it is possible to purchase a JR Pass exchange order while being physically in Japan. (Of course, you must allow a couple days for shipping.)
From 8 March, 2017 through 31 March, 2018, the Japan Rail Pass will be sold at several locations in Japan, including Narita, Haneda, and Kansai airports, albeit at a somewhat inflated price (e.g., 33,000 yen for a 7-day ordinary pass versus 29,110 normally).