IANAL. Technically, it's not a copyright issue, but a trademark issue. You don't have a copyright in one word, like a name.
I recently read a book that has a character named "John". Does that mean no one else is allowed to use the name "John" for characters in their books, or for the names of real children? Obviously not.
But you can have a trademark in a name. Trademark laws can get complicated, and vary from country to country and state to state. Here in Michigan in the United States, the law says that made-up words have the highest trademark protection, ordinary words used in an unusual context less, and descriptive phrases the least. For example, if you call your company "Anabraxmalis", and someone else tries to call their company by the same name, you would almost certainly win a trademark lawsuit. But if you call your company "Main Street Grocery Store", and someone in a nearby town opens a store and uses the same name for a grocery store that is on Main Street in that town, you would almost certainly lose a trademark lawsuit.
I've heard a couple of people say that "Dumbledore" is not actually a made-up word but simply a very obscure one. If J K Rowling did just make it up, she would have grounds for a trademark suit against you if you tried to use it, especially if you tried to use it for anything to do with writing or fantasy. If it's an obscure word, her case would be tougher, but if so it must be very obscure, so she'd probably still have a fair case. Note that, in the U.S. anyway, a trademark does not have to be registered. The fact that someone has used a word or phrase in some commercial context consistently over a period of time gives them rights to it. Registering a trademark strengthens your legal protection, but is not required.
But all that said, Why do you want to use the name of someone else's character as your pen name? I can only imagine two reactions that readers might have to such a pen name: (a) That you are somehow associated with J K Rowling; or (b) That you are trying to fool people into thinking that you are associated with J K Rowling. The first is not true, and the second is not flattering.
I think you would be far better off to create a distinctive image for yourself, rather than to try to "hijack" someone else's character.