Haven't had a cat for years now, but agree with everyone else. You can't teach a cat not to scratch.
Incidentally, why do you want a cat? Especially when you are having a baby soon.
My cats were lovely, but I don't want another, even though I had cats for many years.
They leave fur everywhere, all over your clothes, sofa's, floors, bedding. They jump on your kitchen worktops when you're not looking and leave fur up tiles, and I didn't like to think where they had been before they were leaping onto my worktops. Ewww.
They brought half dead birds in, I found a headless fish in my garden, voles, mice and played with and ate big spiders.
They do that thing where they knead you and if you have thin clothes on, it bloody hurts.
They shit all over my garden too.
They also ran up my curtains.
You've heard about people being drains or radiators? Well, cats are drains as opposed to dogs being radiators.
This doesn't touch on the vets bills, immunisations, neutering, food, worming treatment, flea treatment.
I loved my cats, and have fond memories of them. They were entertaining more than anything.
Your baby will find a cat very entertaining when they are mobile, although the cat wont necessarily like it, and as well as scratching your furniture and you, a cat will scratch your baby once baby is mobile and grabs cat.
I wouldn't, I really wouldn't, not until your baby is much much older.