I definitely recommend talking to your primary care doctor
Dandruff can sometimes get quite severe to the point where small breaks in the skin cause infections to take hold. This can require topical antibiotic ointment or sometimes even oral antibiotics, as determined by your primary care doctor.
Additionally, it sounds like you need to start using an anti-dandruff shampoo, of which there are many over the counter versions, in order to help get this under control.
Another possibility is seborrheic dermatitis. Seborrheic dermatitis is an inflammation of the scalp and other oily areas of the skin characterized by crusting, flaking, and itching. It is sort of like the extreme spectrum of dandruff and, unlike simple dandruff, may not respond to just anti dandruff shampoo. Rather, a number of steroid creams and shampoos are used and, in some cases, an anti fungal medication may also be indicated.
I would not be so worried about the hair loss
right now until you get the scalp sores and itching under control, as it is most likely that the hair loss is just secondary to the scalp inflammation. Once you have the scalp problem under control, if you still are losing hair you can address it at that time.