Registering with the NHS isn't an issue - they can register anyone, whether they are entitled to care or not... it's the fact that you had treatment and didn't pay for it that could be a problem.
As KFDancer said, if you have more than £1,000 of unpaid NHS debt, your visa will be automatically refused.
It's very unlikely your treatment would have cost that much, but you need to get the NHS surgery to send you a bill and for you to pay it (or official confirmation that you are not being charged for it). Then you have to give the details of your treatment on the application and also include the receipt for the payment.
Unfortunately, a lot of the time NHS employees are not aware that some people are required to pay and so they try to tell you that you should not be charged. However, as a visitor, you were not entitled to ANY free treatment unless it was A&E emergency treatment, and so you have to insist that they bill you, even if they tell you otherwise.