Yes, but a little complicate. First, they cannot get married until at least 90 days later after the lady enters US uisng B1 visa (90-day Rule). Second, the lady needs to keep the valid B1 status until she files I-485 when the I-130 priority date is current. Check this link every month for the I-485 filing date for F2A category:
Adjustment of Status Filing Charts from the Visa Bulletin | USCIS
For example, if the lady entered US using B1 visa before January 1, 2023, then she would get married now and then, her spouse would file I-130 and she would file I-485 concurrently in April 2023.
We do not know how the 排期 will change in the next several months, but it deserves to take a try.