In Massachusetts, USA, can a physician refuse to see patients that are not referred by their primary care physician? (Even patients whose health insurance does not require a referral for the appointment to be covered?)
Is there some reason you think they can't?
In general, anyone is free to do business, or refuse to do business, with anyone else.
There are a few restrictions on this. For example, certain businesses can't refuse to serve clients based on their membership in a protected class such as race or sex. I don't know how either federal or Massachusetts law treats medical practices with respect to anti-discrimination statutes, but it's fair to assume a "whites only" medical practice could find itself in hot water under certain circumstances.
Apart from the protected reasons, people are generally free to refuse to do business with anyone, for any reason. Someone couldn't come to your web design business and demand that you design their web page, and if you had a policy that you only accepted business on a referral basis, they couldn't sue you. And if you had a restaurant with a "customers must wear pants" policy, you could refuse to serve a pantsless patron. For the most part, a medical practice is no different.
It's possible a doctor might have signed a contract with a third-party payor (for example, your insurance company) saying that he or she has to accept that payor's policyholders without referrals. But absent any such consideration, a doctor is as free as anyone else to do business, or refuse to do business, with anyone he or she sees fit.
This only applies to nonemergency care, of course, which your question specified you were asking about. The question gets more complex in urgent/emergency situations, where there are specific laws about who is entitled to what treatment.