A friend told me that it is not possible to have one esxi connected to 2 differnent networks - I guess thats not correct then.
No, your friend is still correct. It holds good for most of the version of previous ESXi versions. It would be meaningless to have multiple gateway in same subnets which would confuse the ESXi server.
Check out these blogs
Challenges with Multiple VMkernel Ports in the Same Subnet | VMware Support Insider - VMware Blogs
Does this mean that any VM i connect to that switch is automatically connected to that network?
No. You can specify the VM to which Virtual machine portgroup it has to be connected. By default, it looks up for "VM Network" portgroup.