The answer is yes, as long as you don't consider a taxi to be a car, and you don't mind missing some of the interesting things in the area.
A caveat first: it's been ten years since I spent much time in Portland (I lived in Boston, would make occasional day trips or lunchtime stops on my way to/from other parts of Maine). Things might have changed.
As a car-free tourist in Portland, you will want to stay in the Old Port area. Lots of shops and restaurants, a few parks that I see on the map but haven't visited, and plenty of chain hotels. I remember this area as moderately hilly: nothing like San Francisco, but maybe 50' up and down as you get close to the water.
The train station is a couple of miles away from the Old Port. I remember this as an industrial area, only seen from the interstate, so don't think you'd want to walk from there even if you weren't pregnant. However, getting a cab shouldn't be a problem.
But ... the Old Port isn't the only thing to see in the Portland area. Probably not something that matters if you're just planning an overnight trip. But for a longer stay, I'd want to go visit lighthouses, or maybe head down to Old Orchard Beach. Or go up to Freeport, the home of L.L. Bean and one of the nicest-looking outlet malls you'll ever see.* And as a bonus for travelers, the Delorme Map store, with its giant rotating globe, is on the way to Freeport.
It's a real town, and the residents would be offended by that comment, but it's a town that's based on commerce. That said, it's commerce that has been forced to look like a New England village; even the MegaBurger chain looks like a colonial house (and it's on the outskirts of town). There are also a surprising number of local establishments amongst the chains.