Yes, you can do that. You register an activity in your app as the handler for your own protocol (scheme). The application manifest will have something like:
<activity android:name=".SchemeActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="myownprotocol" />
</intent-filter>
</activity>
This activity will not be displayed or get an icon in the application launcher so you probably have an "ordinary" activity in addition to this one.
Now, any web page can have link like the following:
<a href="myownprotocol://12345">Sample link</a>
With the application installed, you should be able to click such a link in the web browser and have the SchemeActivity in my sample be shown. Inside that activity, you can fetch the whole link (and parse the additional id/data or whatever you have there) by:
String fullUrl = getIntent().getDataString();