Agreed--an NI number by itself should not entitle you to NHS treatment. That is true. What I'm describing, however, is a real phenomenon of how policy is misconstrued in GP surgeries in NHS Lothian at the present time. This is also true.
What readers should take into account in this thread, therefore, is the following:
1) NHS services are devolved; law or Department of Health policy may be UK wide, but expect regional differences in *procedure*, with the possibility of resultant error in relation to relevant legal mandate. As the different experiences listed in this thread will attest to, you may be asked to provide different things in England vs. Scotland, in different trusts in England, different surgeries, etc.
2) With regards to what you're entitled to, don't expect to get accurate information from calling the trust. At least in NHS Lothian, in my experience, most of the day-to-day employees you'll deal with will get it wrong--after all, most of my colleagues are Scottish and haven't given a second thought to UK visa issues. Get your information from the Department of Health (posted by Webyj above), print it out, and take it with you to show the surgery/hospital.
3) The most expedient way to get the coverage you deserve is to bring as much evidence as you can--visa, contracts, NI number, Council tax bill, University acceptance letter, etc.--to the surgery to show proof that you live and work in the UK. I'm not advocating that people should use an NI number to skirt the law. What I'm saying is to expect to be asked for something that you shouldn't legally be required to show, then make a choice, a) show the document, or b) go through the time and effort of dealing with the relevant bureaucracy of your choice to fight the good fight.