The hosts file is simply something local to a machine.
Therefore, if you have a computer that queries www.foo.bar, it will first look in its host file, find nothing then query its DNS server. The DNS will look in its local zones, find nothing and send a recursive query (?... need to double check) to it's linked DNS servers and then if it finds nothing, it will send a query to the root zones.
At no point are DNS services on a machine influenced by their own hosts file. So if you add it, it will simply be for the server and only the server.
That being said, IF that server is the DNS server for the network, you can easily insert a new zone for foo.bar and an A/Cname record for www or just *, followed by a value of 127.0.0.1, this should do what you want for the entire network.