The loose frets might be the end result of fretboard wood shrinkage/drying out over time?
But you wanna take that guitar to a luthier who has handled such instruments before, not someone who might be the licenced Martin repairer in your area & only used to relatively new guitars. Someone who has worked with old acoustics or jazzers and knows the perils of what is within. The tuning pegs could be fragile, the bridge as well.....lots of stuff that could need some serious professional restoration...That doesn't mean it will devalue the instrument, but it obviously hasn't had decades of seasonal repair work to keep it in trim and now it needs restoring.
I would bet if you found someone interested in the guitar as is, they'll be factoring in the cost of restoration into their offer. Who wouldn't want to own something like that guitar and not have it playable!..So I wouldn't think a restoration is going to harm your sell price eventually - so long as the restoration in minimally invasive and strives to preserve existing parts.....Things like 'provenance' also loom large in the sale price, if it is for sale, and the fact the Grandfather has had it for so long speaks plenty of provenance, but if there's any documentation with the guitar that would hep the provenance greatly. Also, should you end up getting the guitar restored, get the luthier to specify in writing what work they did, that will help with provenance. Ideally, you want an old guitar that is in original condition, well, that is what it is now, but the condition of the instrument is poor.The poor condition will affect the value. If it had been a working guitar, it would have been overhauled a few times now with fret jobs and bridge & tuner replacements, and that could have de-valued the instrument if the work had not been specified and done to a professional and minimally invasive standard. Now is your chance to strike the happy medium, get the guitar back to it's old glory and have it properly restored. It will probably never be as valuable as a museum piece that has been professionally conserved for the last 50 years, but you can aim to restore it to near new condition or as close as you can get, and keep in mind that it is better to restore old parts than replace them.
Quite frankly, if you are in the USA, I'd suggest ringing up Martin themselves, speaking to their custom shop luthiers there and asking them who to trust with quotes etc. for the restoration. Out of interest for an old instrument they may give you pointers on what work might lay ahead.
Will be interesting how it all turns out and any photos possible just out of curiosity?