but to do so, user should be in same ssid because it is internal ip address they are in.
No. The SSID is the network ID. That has nothing to do with the local IP address that you see.
The ONLY device in your network with a public facing IP address is your router. It is that IP address that you use, with the port that the Arduino is being forwarded data on. This means that you must enable port forwarding on your router, and assign a specific port to the Arduino (and use that as part of the URL - http://xxx.xxx.xxx.xxx:nn/script, where the xs represent the public IP address and the ns are the port number).