The short answer to the question is: yes, you can.
Here's the long answer:
Orthanc's core has been released under the GPL v.3 license, which means anyone can use it for free. Changes to the code must be submitted. The community will analyse and eventually integrate if judged appropriate.
Orthanc's plugins have been released under the AGPL license, which implies that any code directly interacting with the plugin shall inherit the AGPL license. This can be seen as an important constraint for many software editors. The way to deal with this, is to use Orthanc's API, which takes away the contagious factor. This covers the use of Orthanc with the out-of-the-box feature set.
If, however, you decided to modify the code of Orthanc's core or that of any of the plugins, then the (A)GPL license will require you to submit your contribution to the community. This doesn't mean it will necessarily be published. It will be analysed by the community and added as part of the package if judged appropriate.
In the event the software editor would prefer this code not to be integrated in the distributed packages, there's an option to buy a licence exception. As for all open source projects, the intellectual propertly of Orthanc is still owned by multiple parties. In this case: CHU Liège University Hospital and Osimis S.A. The latter party (us), have the faculty to sell licence exceptions.
When contributing to open source, it is important to understand that the intellectual property rights are transferred to the community. Ideally, a Contributor License Agreement shall be signed.
We'd like to stress the fact that our vision for open source is to maximise contributions and for the GPL license not to be a barrier to using Orthanc.