Honestly, you will have to build something at home to fit in the space of the shock if you want to make it rigid. I have never come across any aftermarket part sold to convert a full-suspension into a hardtail. With the lockout on, the shock will still sag slightly so the infant seat might or might not rub with the tire. It really depends how much clearance you currently have now. I would go into a LBS and ask to see a bike with a lock-out rear suspension and lock it out and push on the back so you can have an idea of how much it sags.
The other option is if you do ride a lot of trails, then keep this bike and find a inexpensive hardtail or hybrid to be used for riding with the infant.