Hello,
Orthanc acts as a server: It receives DICOM files from a modality or a PACS, but it never modifies the received files by itself. In other terms, Orthanc never creates/removes DICOM tags (except if it is asked to do so).
In your case, if the Accession Number tag is not set, it is definitely a configuration problem in your modality or in your RIS system.
Note that it is possibly to modify the content of a DICOM study (e.g. to add an Accession Number) stored inside Orthanc, either with a Lua script or with a call to the REST API, but I would not favor this approach in your case. The Accession Number should be set ahead of time in any clinical workflow.
HTH,
Sébastien-