This answer focuses on distinguishing "Rules of German language" from "Language policies of specific organisations"
The use of female forms in work contracts is not related to "rules of German language" (as your employer reportedly claimed), it is related to a language policy of that particular employer.
Generally, in "official" texts in German, authors tend to address both traditional genders ("male" and "female"), or sometimes they nowadays also try to include new, non-traditional genders such as "divers".
This is particularly so for texts issued by government organisations / authorities because they are bound to such practice by their internal directives. Likewise the HR departments of the bigger companies have that habit, most visibly so in job offers where they almost always offer jobs like
Friseur/Friseurin*
Bäcker/in
Auszubildende/r
Kaufmann/Kauffrau für Tourimus und Freizeit
which is rooted in the legal obligation to not discriminate against anybody in job offers etc. and the risk of being sued by other candidates for the job in case of alleged discrimination.
As for the spelling, there is no general rule how to spell these things for German language as such, but certain ways of spelling are established in certain areas of publishing, not least in legal contexts. The older way was to use a slash (/) or a capital "I" (BürgerInnen). There is a newer trend to use an asterisk (*), resulting in things like
Sehr geehrte*r Interessent*in
where the asterisk is meant to indicate openness to any possible gender (include non-traditional ones like divers)
Again, all this is not about the "rules of German language". It is about policy of certain institutions/organisations, or anti-discrimination laws in certain areas of public communication.
Opposed to that, you will hardly find "gendering" in belles lettres / poetry / fiction / nonfiction books. These are genres where elegance of language is usually seen as more important than political correctness, and a majority of readers (and professional writers) still find all the attempts of "gendering" too clumsy and cluttered. So you would then use
Die Lehrer gingen auf die Straße und protestierten, denn die
Lehrergehälter waren ihnen zu niedrig.
where the female teachers (Lehrerinnen) are seen as automatically included.
In an "official" text, however, this sentence would rather be something like
Die Lehrer und Lehrerinnen gingen auf die Straße, denn ihre Gehälter waren ihnen zu niedrig
Die Lehrer/innen...
Die Lehrer*innen...
As you were wondering about your work contract: the employer would well have been able to use the correct gender for you (i.e. sticking to what you indicated him to be your gender), but most probably they use a broadly applicable template text fitting all possible genders just to save editing time. Claiming that this is because of the "rules of German language" is a typical utterance of a person not really educated in German linguistics.