How can I add a custom context menu item on a text selection in the Terminal?
AFAIK no, but you can make an new Service with the Automator.app.

And the new service will appear in the "Services" submenu in the context menu.

Assuming than you're familiar with scripting and Automator - if not, enter more details what you want achieve with the URL... (for an example can check: https://apple.stackexchange.com/a/63362/6838)