A first edition of JK Rowling’s debut Harry Potter novel has sold for £18,000 after going under the hammer.