We report on the discovery of the companion star to the millisecond pulsar J1631+3627F in the globular cluster M13. By means of a combination of optical and near-UV high-resolution observations obtained with the Hubble Space Telescope, we identified the counterpart at the radio source position. Its location in the color-magnitude diagrams reveals that the companion star is a faint (V sim 24.3) He-core white dwarf. We compared the observed companion magnitudes with those predicted by state-of-the-art binary evolution models and found out that it has a mass of 0.23 pm 0.03 Msun, a radius of 0.033^+0.004_-0.005 Rsun and a surface temperature of 11500^+1900_-1300 K. Combining the companion mass with the pulsar mass function is not enough to determine the orbital inclination and the neutron star mass; however, the last two quantities become correlated: we found that either the system is observed at a low inclination angle, or the neutron star is massive. In fact, assuming that binaries are randomly aligned with respect to the observer line of sight, there is a sim 70% of probability that this system hosts a neutron star more massive than 1.6 Msun. In fact, the maximum and median mass of the neutron star, corresponding to orbital inclination angles of 90 deg and 60 deg, are M_NS,max = 3.1 pm 0.6 Msun and M_NS,med = 2.4 pm 0.5 Msun, respectively. On the other hand, assuming also an empirical neutron star mass probability distribution, we found that this system could host a neutron star with a mass of 1.5 pm 0.1 Msun if orbiting with a low-inclination angle around 40 deg.