You can directly connect the modem, but the type of modem will determine your setup options. If the modem is acting as a NAT router and issuing private IP addresses (listed below), the you can run your WiFi networks/SSIDs in bridge mode. This allows devices across the network to communicate with each other. If the modem is issuing public IP addresses, then your WiFi Networks/SSIDs will be configured in NAT mode, which will not allow devices on the network communicate with each other.
Private IP Ranges
10.0.0.0 to 10.255.255.255.
172.16.0.0 to 172.31.255.255.
192.168.0.0 to 192.168.255.255.