nope. the computer doesn't have to be connected via wifi... it just has to be connected to the same network. if you have a wifi router, it can be connected via lan cable.
so in the OP's case, connect your modem to your wifi router's input, then attach the computer to one of the lan ports. this will not only put the computer within the same network, but will also allow anything connected via wifi to have direct internet access via the wwan... like your iPhone.
unless of course you have no wifi router and have the computer connected directly to a modem and your iPhone is connected via wifi to your neighbor's unsecured wwan.