Typically, querying a public website for the IP that connects to it works fine, and does report YOUR IP that is connected to the external world. This is the approach I usually recommend, same as other users.
However, it has recently come to my attention that some ISPs hide their users behind a NAT on the ISP's side, in which case such sites will see the ISP's IP, not the user's IP. So, to get your own external IP (ie, the IP that is connected to the ISP) in that situation, you would have to query your modem/router directly instead, such as with uPNP.