Hi!
Yes, this works with GMS 2. The server can both be in a separate project or in the same project as the client, it's completely optional. And yes you would have to use a dedicated server if you want people to connect remotely.