In short, Latin-speakers themselves didn't know for sure. ...
In addition to where the Latin speakers, or Latin scholars today looking at the limited Latin texts that the ancients left us, weren't or aren't sure, are there not some cases where the word itself can logically function
both as masculine and feminine, depending on who or what individual it is referring to, instead of uncertainly as m or f, we don't know which?
Here are some examples of m/f nouns in my vocabulary:
vātēs - prophet, poet
sodālis - companion, friend
sacerdōs - priest(-ess)
elephantus - elephant
Clearly, a prophet, companion, priest, or elephant might be male or female, and it seems the Romans just didn't care to create two distinct nouns for the two cases -- unlike their practice with certain other nouns, or should I say "noun pairs," such as
equus / equa and
magister / magistra.
However, it seems unlikely that
margo fits this description -- a male or female edge, rim, or border makes no sense to me -- so I guess in this case we just don't know whether it was masc. or fem.