Yes, it can be attacked even if the players haven't signed up for a battle. In this case, they will receive a notification that another gang has started an attack instead of the usual message that they have started an attack.

The system would only resort to matching a gang that doesn't have all the required member enlisted if there is a natural shortage of opponents in the district and if the other gang has been waiting for a while already (this can happen if the other gang finished the attack earlier or if your gang did the same, which made it the first available gang in the matchmaking pool).