While a Dermatologist is one physician who is capable of diagnosing melanoma, they are not, by far, the only physician.
When I was running the Melanoma cancer clinic, the Derms never did the biopsy or the subsequent surgery, it was always the surgical oncologist who had specialty training...