See the JS API documentation. After ACF inserts the sidebar in the gallery it runs the append action https://www.advancedcustomfields.com/resources/javascript-api/#actions-append. The value $el here is the sidebar data. You could possibly create an action on this hook that could insert the download link. (?)
Unfortunately, that’s as much as I can give you. I don’t know all the details on exactly what would need to be done to accomplish this, only the place to start looking.