The production of a [Formula: see text] boson in association with a [Formula: see text] meson in proton-proton collisions probes the production mechanisms of quarkonium and heavy flavour in association with vector bosons, and allows studies of multiple parton scattering. Using [Formula: see text] of data collected with the ATLAS experiment at the LHC in [Formula: see text] collisions at [Formula: see text], the first measurement of associated [Formula: see text] production is presented for both prompt and non-prompt [Formula: see text] production, with both signatures having a significance in excess of [Formula: see text]. The inclusive production cross-sections for [Formula: see text] boson production (analysed in [Formula: see text] or [Formula: see text] decay modes) in association with prompt and non-prompt [Formula: see text] are measured relative to the inclusive production rate of [Formula: see text] bosons in the same fiducial volume to be [Formula: see text] and [Formula: see text] respectively. Normalised differential production cross-section ratios are also determined as a function of the [Formula: see text] transverse momentum. The fraction of signal events arising from single and double parton scattering is estimated, and a lower limit of [Formula: see text] at [Formula: see text] confidence level is placed on the effective cross-section regulating double parton interactions.