The client only needs Forge installed if the server's mods need to be installed on the client. If none of the server's mods are required on the client, a Vanilla client can join.
In what context?
If you have a MinecraftServer argument available, use that. If you have an object with a method that returns MinecraftServer (e.g. World#getMinecraftServer), use that.
If all else fails, you can use FMLCommonHandler#getMinecraftServerInstance.