So a program is running on some computer, connects to the internet, goes to some IP/URL address, makes a connection, and somewhere along the way notifies you that it is doing so.
Then you click a button or push a keyboard key to interrupt and block the connection. Basically telling the program to "stop that", "do not do so again", and "do something else".....
The trouble I am having is that if the program has gone out and made a connection it may already be too late if the target site is malicious.
Your desired program would have to be in an overall watch position and basically be continually telling your things such as Application X is trying to connect to website/IP address Y. Then offer some "Do you agree and if so the connection will be allowed/whitelisted" message. And if you decline, the over watch will block the connection and blacklist the website/IP. Maybe until told otherwise at some future time.
Not aware of any specific program but if I have correctly stated the requirements someone else may be able to suggest a candidate program or two to serve as the "overwatch".
Here is a link that may be helpful:
https/www.paloaltonetworks.com/documentation/80/best-practices/best-practices-data-center/data-center-best-practice-security-policy/log-and-monitor-data-center-traffic/what-data-center-traffic-to-log-and-monitor
Idea being that you can identify and do additional web searches based on the applicable terminology for your requirements.
And add more information or detail with respect to your requirements.