I think this is related to one of Sekiro's ending, where the divine child literally get pregnant, and her child is Kuro. Correct me if I'm wrong.
k, just checked the wiki regarding the endings and it's weirder than that something something, the Divine Child unbirths Kuro, that's how she becomes "pregnant".
Definitely based off of ancient legends and stuff, no rules to speak of.