Hello,
Yes, it is possible to implement this feature as a C/C++ plugin to Orthanc:
http://book.orthanc-server.com/developers/creating-plugins.html
The calls of interest in the Orthanc plugin SDK are “OrthancPluginRegisterFindCallback()” (to override the default handling of DICOM C-FIND) and “OrthancPluginRegisterMoveCallback()” (to override the default handling of DICOM C-MOVE):
http://sdk.orthanc-server.com/
HTH,
Sébastien-