Additionally this doesn't work for an item you don't have access to - i.e. one that isn't in your hold and isn't available for sale on a nearby station. How does one check the availability / sale data then?
You can look at the global economy by going to the system map and clicking on a colony, and somewhere from there, check their commodities (I don't have the game with me rn, I will double check and reply when I get home).
But if you recover a ship in space... doesn't that immediately use some resources?
Not necessarily. The supplies and crew shown when restoring a ship on the top of the menu (the yellow and blue bars) are the values for restoring the ship to max combat readiness. When you click on a ship to restore it, there are small yellow (and blue?) numbers on the ship itself that show the values for REPAIRING the ship immediately, i.e. getting it barely operational so you can haul it with you. It's usually worth it.
When you mothball a ship, the only thing it consumes is fuel, and that's if you're in hyperspace. So mothballing ships is the best solution for a dead weight ship you just restored, and fuel is easy to come by, so it's worth it.
Also - this only works in space - what about when viewing ships available for purchase?
You can't refit available derelict ships and ships available for purchase, and therefore can't look at the tooltips for the hullmods and d-mods. The only information you can get is the "F1" tooltip. Even then, the stats that d-mods debuff are shown with orange text, and the d-mods themselves are mostly self-explanatory. I listed some of the more obscure ones below:
Defective Manufactory: debuffs fighters with lower speed and more damage taken
Ill-Advised Modifications: increases chances of malfunction
Malfunctioning Comms: debuffs fighters with lower range
Unreliable Subsystems: decreases operation time
Overall, it's just memorization. Even then, you can check the debuffs in the "F1" tooltip and decide if it's something you're okay with.