Not exactly. You NEED to use an IP address. IPv4 or v6 or both. But in your case you are using an IPv4 which can't be an issue here.
You issue is lying in two things: NATing and Routing. Can be both or any one of them.
Normally you are using a Private IP address. To check this issue a ifconfig or ipconfig (on Windows) and see what IP you have. If it is in the Private IP range (10.0.0.1 going to 10.0.0.254 or 172.16.0.1 going to 172.31.255.254 or 192.168.0.1 going to 192.168.255.254) then you need what we call NAT.
Those addresses are not routable on the internet. So your router should automatically NAT this to a public IP you are either paid for directly or given by your ISP. If this is not done you can't "go out".
On the routing part, you need to check you default gateway.
If you issue a ipconfig /all on your Window machine, you should see the IP address of your Router (ISP one) or your cloud provider etc.