I'd be a little surprised if the molecular cloud directly affected the Sun's magnetic field. The Sun's surface field is on the order of 1 Gauss, whereas molecular clouds have magnetic fields of at most $\sim10^{-3}$ Gauss, or maybe slightly higher - still higher than the typical interstellar magnetic field, but insignificant compared with the Sun's. I don't think the Sun's magnetic field will be affected. It might be interesting to see if it would induce any additional magnetic reconnection, but I'd bet that that would be miniscule.
That said, if the Solar System passes through a molecular cloud, some of that gas and dust will be accreted by the Sun. We could approximation the process as Bondi accretion; assuming typical molecular cloud properties gives us a sound speed of $c_s\sim0.3\;\text{km s}^{-1}$, which in turn implies an accretion rate of $\dot{M}\sim4\times10^{16}\;\text{kg s}^{-1}$. Making a crude approximation based on accretion disks (which are, yes, disk-shaped and not spherical), it might be reasonable to see temperatures higher than $\sim10^4$ Kelvin near the very center.
This would mean that there would be some gamma-ray emission - blackbody radiation implies emission across all wavelengths - but we'd see peak emission from that inner region at ultraviolet and x-ray wavelengths. I don't think it would be significant, since this is a fairly low accretion rate, but it could make things at least somewhat unpleasant on Earth. This is just a back-of-the-envelope estimation, of course.