Welcome!
Mazda 3 comes with 17" wheels.
Mazdaspeed 3 comes with 18" wheels.
So the appropriate question would be, "Would 17" wheels from a Mazda 3 work on a CX-7?"
The bolt pattern may work, but the load rating on the wheel may not. A lot of guys look into putting Mazda RX-8 wheels on their CX-7 and that really ends up being the main concern. The Mazda 3 and RX-8 wheels are made for those specific vehicles, which weigh 500-1,000lbs less than the CX-7.
My suggestion would be to go into your local tire shop after finding a rim they sell that you like, and have them work you a deal on that. OEM wheels can be tricky to find, or may cost the same as a decent looking set of aftermarket wheels, especially if you purchase the wheels with the tires from the tire shop, they may work you out a pretty sweet deal.