The Cherenkov Telescope Array and the KM3NeT neutrino telescopes are major upcoming facilities in the fields of gamma-ray and neutrino astronomy, respectively. Possible simultaneous production of rays and neutrinos in astrophysical accelerators of cosmic gamma-ray nuclei motivates a combination of their data. We assess the potential of a combined analysis of CTA and KM3NeT data to determine the contribution of hadronic emission processes in known Galactic gamma-ray emitters, comparing this result to the cases of two separate analyses. In doing so, we demonstrate the capability of GAMMAPY, an open-source software package for the analysis of gamma-ray data, to also process data from neutrino telescopes. For a selection of prototypical gamma-ray sources within our Galaxy, we obtain models for primary proton and electron spectra in the hadronic and leptonic emission scenario, respectively, by fitting published gamma-ray spectra. Using these models and instrument response functions for both detectors, we employ the GAMMAPY package to generate pseudo data sets, where we assume 200 h of CTA observations and 10 years of KM3NeT detector operation. We then apply a three-dimensional binned likelihood analysis to these data sets, separately for each instrument and jointly for both. We find that the largest benefit of the combined analysis lies in the possibility of a consistent modelling of the gamma-ray and neutrino emission. Assuming a purely leptonic scenario as input, we obtain, for the most favourable source, an average expected 68% credible interval that constrains the contribution of hadronic processes to the observed gamma-ray emission to below 15%., The KM3NeT Collaboration acknowledges the financial support of the funding agencies: Agence Nationale de la Recherche (contract ANR-15-CE31-0020), Centre National de la Recherche Scientifique (CNRS), Commission Européenne (FEDER fund and Marie Curie Program), LabEx UnivEarthS (ANR-10-LABX-0023 and ANR-18-IDEX-0001), Paris Île-de-France Region, France; Shota Rustaveli National Science Foundation of Georgia (SRNSFG, FR-22-13708), Georgia; The General Secretariat of Research and Innovation (GSRI), Greece; Istituto Nazionale di Fisica Nucleare (INFN), Ministero dell’Università e della Ricerca (MIUR), PRIN 2017 program (Grant NAT-NET 2017W4HA7S) Italy; Ministry of Higher Education, Scientific Research and Innovation, Morocco, and the Arab Fund for Economic and Social Development, Kuwait; Nederlandse organisatie voor Wetenschappelijk Onderzoek (NWO), the Netherlands; The National Science Centre, Poland (2021/41/N/ST2/01177); National Authority for Scientific Research (ANCS), Romania; Grants PID2021-124591NB-C41, -C42, -C43 funded by MCIN/AEI/ 10.13039/501100011033 and, as appropriate, by “ERDF A way of making Europe”, by the “European Union” or by the “European Union NextGenerationEU/PRTR”, Programa de Planes Complementarios I+D+I (refs. ASFAE/2022/023, ASFAE/2022/014), Programa Prometeo (PROMETEO/2020/019) and GenT (refs. CIDEGENT/2018/034, /2019/043, /2020/049, /2021/23) of the Generalitat Valenciana, Junta de Andalucía (ref. SOMM17/6104/UGR, P18-FR-5057), EU: MSC program (ref. 101025085), Programa María Zambrano (Spanish Ministry of Universities, funded by the European Union, NextGenerationEU), Spain; The European Union’s Horizon 2020 Research and Innovation Programme (ChETEC-INFRA – Project no. 101008324). T. Unbehaun, L. Mohrmann, and S. Funk are members of the CTA Consortium. The paper has been reviewed by the CTA Consortium Speakers and Publications Office. This research has made use of the “Prod 5” CTA instrument response functions provided by the CTA Consortium a, Peer Reviewed, Article signat per 274 autors: T. Unbehaun, L. Mohrmann, S. Funk, i membres del "KM3NeT Collaboration": S. Aiello, A. Albert, S. Alves Garre, Z. Aly, A. Ambrosone, F. Ameli, M. Andre, E. Androutsou, M. Anghinolfi, M. Anguita, L. Aphecetche, M. Ardid, S. Ardid, H. Atmani, J. Aublin, C. Bagatelas, L. Bailly-Salins, B. Baret, S. Basegmez du Pree, Y. Becherini, M. Bendahman, F. Benfenati, M. Benhassi, D. M. Benoit, E. Berbee, V. Bertin, S. Biagi, M. Boettcher, M. Bou Cabo, J. Boumaaza, M. Bouta, M. Bouwhuis, C. Bozza, R. M. Bozza, H. Brânzaş, F. Bretaudeau, R. Bruijn, J. Brunner, R. Bruno, E. Buis, R. Buompane, J. Busto, B. Caiffi, D. Calvo, S. Campion, A. Capone, F. Carenini, V. Carretero, T. Cartraud, P. Castaldi, V. Cecchini, S. Celli, L. Cerisy, M. Chabab, M. Chadolias, A. Chen, S. Cherubini, T. Chiarusi, M. Circella, R. Cocimano, J. A. B. Coelho, A. Coleiro, R. Coniglione, P. Coyle, A. Creusot, A. Cruz, G. Cuttone, R. Dallier, Y. Darras, A. De Benedittis, B. De Martino, V. Decoene, R. Del Burgo, L. S. Di Mauro, I. Di Palma, A. F. Díaz, D. Diego-Tortosa, C. Distefano, A. Domi, C. Donzaud, D. Dornic, M. Dörr, E. Drakopoulou, D. Drouhin, R. Dvornický, T. Eberl, A. Eddymaoui, T. van Eeden, M. Eff, D. van Eijk, I. El Bojaddaini, S. El Hedri, A. Enzenhöfer, G. Ferrara, M. D. Filipović, F. Filippini, L. A. Fusco, J. Gabriel, T. Gal, J. García Méndez, A. Garcia Soto, C. Gatius Oliver, N. Geißelbrecht, H. Ghaddari, L. Gialanella, B. K. Gibson, E. Giorgio, A. Girardi, I. Goos, S. R. Gozzini, R. Gracia, K. Graf, D. Guderian, C. Guidi, B. Guillon, M. Gutiérrez, H. van Haren, A. Heijboer, A. Hekalo, L. Hennig, J. J. Hernández-Rey, F. Huang, W. Idrissi Ibnsalih, G. Illuminati, C. W. James, M. de Jong, P. de Jong, B. J. Jung, P. Kalaczyński, O. Kalekin, U. F. Katz, N. R. Khan Chowdhury, A. Khatun, G. Kistauri, F. van der Knaap, A. Kouchner, V. Kulikovskiy, R. Kvatadze, M. Labalme, R. Lahmann, G. Larosa, C. Lastoria, A. Lazo, S. Le Stum, G. Lehaut, E. Leonora, N. Lessing, G. Levi, Membres del KM3Net: S. Aiello, A. Albert, S. Alves Garre, Z. Aly, A. Ambrosone, F. Ameli, M. Andre, E. Androutsou, M. Anghinolfi, M. Anguita, L. Aphecetche, M. Ardid, S. Ardid, H. Atmani, J. Aublin, C. Bagatelas, L. Bailly-Salins, B. Baret, S. Basegmez du Pree, Y. Becherini, M. Bendahman, F. Benfenati, M. Benhassi, D. M. Benoit, E. Berbee, V. Bertin, S. Biagi, M. Boettcher, M. Bou Cabo, J. Boumaaza, M. Bouta, M. Bouwhuis, C. Bozza, R. M. Bozza, H. Brânzaş, F. Bretaudeau, R. Bruijn, J. Brunner, R. Bruno, E. Buis, R. Buompane, J. Busto, B. Caiffi, D. Calvo, S. Campion, A. Capone, F. Carenini, V. Carretero, T. Cartraud, P. Castaldi, V. Cecchini, S. Celli, L. Cerisy, M. Chabab, M. Chadolias, A. Chen, S. Cherubini, T. Chiarusi, M. Circella, R. Cocimano, J. A. B. Coelho, A. Coleiro, R. Coniglione, P. Coyle, A. Creusot, A. Cruz, G. Cuttone, R. Dallier, Y. Darras, A. De Benedittis, B. De Martino, V. Decoene, R. Del Burgo, L. S. Di Mauro, I. Di Palma, A. F. Díaz, D. Diego-Tortosa, C. Distefano, A. Domi, C. Donzaud, D. Dornic, M. Dörr, E. Drakopoulou, D. Drouhin, R. Dvornický, T. Eberl, A. Eddymaoui, T. van Eeden, M. Eff, D. van Eijk, I. El Bojaddaini, S. El Hedri, A. Enzenhöfer, G. Ferrara, M. D. Filipović, F. Filippini, L. A. Fusco, J. Gabriel, T. Gal, J. García Méndez, A. Garcia Soto, C. Gatius Oliver, N. Geißelbrecht, H. Ghaddari, L. Gialanella, B. K. Gibson, E. Giorgio, A. Girardi, I. Goos, S. R. Gozzini, R. Gracia, K. Graf, D. Guderian, C. Guidi, B. Guillon, M. Gutiérrez, H. van Haren, A. Heijboer, A. Hekalo, L. Hennig, J. J. Hernández-Rey, F. Huang, W. Idrissi Ibnsalih, G. Illuminati, C. W. James, M. de Jong, P. de Jong, B. J. Jung, P. Kalaczyński, O. Kalekin, U. F. Katz, N. R. Khan Chowdhury, A. Khatun, G. Kistauri, F. van der Knaap, A. Kouchner, V. Kulikovskiy, R. Kvatadze, M. Labalme, R. Lahmann, G. Larosa, C. Lastoria, A. Lazo, S. Le Stum, G. Lehaut, E. Leonora, N. Lessing, G. Levi, M. Lindsey Clark, F. Longhitano, J. Majumdar, L. Malerba, J. Mańczak, A. Manfreda, Postprint (published version)