Although many high-energy neutrinos detected by the IceCube telescope are believed to have anextraterrestrial origin, their astrophysical sources remain a mystery. Recently, an unprecedenteddiscovery of a high-energy muon neutrino event coincident with a multiwavelength flare from ablazar, TXS 0506+056, shed some light on the origin of the neutrinos. It is usually believed that ablazar is produced by a relativistic jet launched from an accreting supermassive black hole (SMBH).Here we show that the high-energy neutrino event can be interpreted by the inelastic hadronuclearinteractions between the accelerated cosmic-ray protons in the relativistic jet and the dense gasclouds in the vicinity of the SMBH. Such a scenario only requires a moderate proton power in thejet, which could be much smaller than that required in the conventional hadronic model whichinstead calls upon the photomeson process. Meanwhile, the flux of the multiwavelength flare fromthe optical to gamma-ray band can be well explained by invoking a second radiation zone in thejet at a larger distance to the SMBH. In our model, the neutrino emission lasts a shorter time thanthe multiwavelength flare so the neutrino event is not necessarily correlated with the flare but it is probably accompanied by a spectrum hardening above a few GeV.