This is a delicate situation.
How long has your wife been present in the US on this trip? To adjust on basis of marriage to LPR, one should be in valid immigration status, all the way up to AOS approval. Only US citizen's spouse overstay and unauthorized work is forgiven. If your wife overstayed by more than 6 months but less than a year, she will have a 3 year bar on entering to the US, if she leaves now. If she overstayed by more than a year, she will have a 10 year bar on entry!
Are you thinking of naturalizing? How soon can you naturalize? This may be a solution. E.g. naturalize first and then petition for her. Do not submit anything before that.
If she's lawfully here now and didn't overstay, she needs to leave the US before her status ends. And you will file I-130 for consular processing in this case.
Regarding the question about pending I-130 and her visiting. Yes, it's possible, but not guaranteed. She cannot lie to CBP if they ask whether she has family in the US or say she's travelling as a tourist with a toddler etc.
There's a thread discussing just that:
Good luck!