As the female equivalent for knighthood is damehood, the suo jure female equivalent term is typically dame. Sir is a title commonly given to men who have been knighted, but also as a way to address any male, especially if his name is not known The meaning of sir is a man entitled to be addressed as sir —used as a title before the given name of a knight or baronet and formerly sometimes before the given name of a priest.
Sir Peter Inks Massive Contract with Falcon|NakedSword
People sometimes say sir as a very formal and polite way of addressing a man whose name they do not know or a man of superior rank
For example, a shop assistant might address a male customer as sir.
Used without a name as a form of polite address to a man you do not know Used without a name as a form of polite address to a man of rank or authority (such as a military or police officer, teacher, or master) Sir is used at the beginning of a formal letter to a man you do not know There are 19 meanings listed in oed's entry for the noun sir, two of which are labelled obsolete
See ‘meaning & use’ for definitions, usage, and quotation evidence.