yes pregnant bitches have to be wormed regularly, they pass worms onto the pups if not wormed and worming does not prevent them catching worms, only treats the ones they do have which is why it needs to be done regularly.
Worms in puppies can be a very serious thing and cause many problems.
Agreeing with Woofgang talk to your vet.