The first woman to rule Egypt as a Pharaoh was Hapshepsut, in the early 18th Dynasty.
The first woman to rule--as a queen--was Sobeknefru, who ruled in the Middle Kingdom. (i'm not sure of the Dynasty)

Gardiner's turin canon lists her as Neferusobek ( Sobekkare), 12th dynasty circa 1760BCE, but gardiner has been fiercely critical of the patchwork repair effort on the original scrolls_________________If you listen very carefully, you can hear the gods are laughing.