Correct, "got her with child" means "got her pregnant", because "with child" is an old-fashioned idiom meaning "pregnant".
"Got her with a child" would not have as clear a meaning and would be liable to be understood differently: outside of idioms and without clarifying language or context, the word "child" usually refers to a child who has already been born.
From Oxford Dictionaries Online:
with child
archaic Pregnant.
‘Yesterday, I drove out to St. Thomas to do a little private practice for one of my colleagues who is with child.’
‘The duke had no heirs, only a wife who was about five months with child.’
‘Not being with child, I cannot attest to the truthfulness of the latter claim - and there is only so much I'll do in the name of research.’
‘While I walk, I muse on art and life. Back home, I make breakfast for Rose, who is with child.’
‘Slowly, her body returns to the form it was before she was with child.’