Lockhart seems to be the clearest case. J. K. Rowling has claimed twice that he's the only character she's based on a real person: first in a 2004 interview
Are any of your characters based on real people?
The only character who is deliberately based on a real person is Gilderoy Lockhart. [...] Other people have contributed the odd characteristic, such as a nose, to a character, but the only character who I sat down and thought that I would base on someone is Gilderoy Lockhart. It made up for having to endure him for two solid years.
Then she wrote the same in the old J. K. Rowling website (probably added in 2005 or 2006):
I have only once set out to depict somebody I have met and, unlikely though it might seem, the result was Gilderoy Lockhart.
The claim that no other characters are based on real world people seems to contradict multiple of Rowling's earlier statements though.
Rowling based Professor Snape on her chemistry teacher John Nettleship. Rand provides evidence for this in his answer to the question that's inspired this one: Rowling said in an 1999 interview
Snape is the - er - very sadistic teacher loosely based on a teacher I myself had, I have to say.
Rowling has partly based Hermione on herself.
She explained this in detail in the same 1999 interview as above:
Hermione is a Shakespearean name – I – I consciously set out to choose a – a fairly unusual name for Hermione, because I didn't want a lot of fairly hard-working little girls to be teased if ever the book was published, because she is a very recognisable type – to which I belonged, when I was young …
I was about to say 'are you Hermione?'
Yeah – w-well – n-n-not … I mean none of the characters in the books are directly taken from life. Real people did inspire a few of them, but of course once they are on the page they become something completely different. But, yeah, Hermione is a caricature of what I was when I was 11 – a real exaggeration, I wasn't that clever – Hermione is a border-line genius at points – and I hope I wasn't that annoying, because I would have deserved strangling; sometimes she is an incredible know-it-all.
(and later in the same day:)
Er - you write those fabulous characters, but they're almost all boys, Hermione is a swot - a very wonderful person, but almost a cardboard cut-out in some ways – do get …
Please don't – please don't say that, because she is actually based on me
(The same interview says that she's met about three bullies similar to Draco Malfoy in real life, which I take as meaning that he's not based on a single person.)
She repeats the same in brief in a 2001 interview:
My feminist conscience is saved by Hermione, who's the brightest character. I love Hermione as a character. She's kind of a caricature of me when I was younger. I was obsessed with achieving academically, but underneath that I was insecure.
Ron and Firenze
Rowling mentions this very briefly in a 2000 chat:
Are any of the characters based on family members or friends?
As I said earlier, Ron is a lot like my oldest friend, Sean[;] and Firenze was inspired by another friend.
A reporter mentions this in a 2000 interview: “Now in an interview you said that Firenze, the Centaur, was based on a friend of yours”