That sounds like an interesting issue. Unless you have a static IP address which you purchased from your ISP, you shouldn't be able to access the internet without configuring your subnet mask and deafult gateway.
When you plug directly into the modem you're still getting an IP address from your ISP's DHCP server. To view the IP address you currently have open command prompt and type:
ipconfig
When you go wireless, you have what's called a private IP address (192.168.1.6 for example). Your wireless router will use NAT (Network Address Resolution Protocol) to translate this private IP into a public IP address as issues by the DHCP sever so your information can travel through the cloud.
I can't see any issue that may come just from an IP address. Perhaps you were blocked from visiting those sites, you may have some internet/firewall setting that is blocking you, or there may be a configuration issue with your wireless router. Try resetting the router or checking the current configuration by typing your routers ip address (192.168.0.1, or 192.168.1.1 or 192.168.1.254).