As far as I am aware, there is no gambit/filter to search discussions by ID.
There is a filter to return posts for a specific discussion ID.
It's not difficult for an extension to add new search gambits that directly map to a database column value.
But if you are not planning to combine this gambit/filter with another, then since the REST API already allows to GET /api/discussions/<id>
this might be better for most use cases.
EDIT: I believe the merge discussions extension allows searching discussions by IDs in the merge modal. Not sure how it was implemented there.