Find the water company's web site and then their Water Quality Report and then hardness or total hardness. If they don't list hardness call them. Use the maximum figure and divide it by 17.1 to convert ppm or mg/l to gpg. If there is more than 3-4 gpg of hardness your tankless water heater warranty may be voided or not but, it won't work well for very long due to hardness scale build up. It is a very rare city water system that doesn't have enough hardness to justify a softener; that is more than 3-4 gpg of hardness. And there is no filter that will remove hardness and you don't need a filter if your water is always clear. There is no sense in filtering visibly clear water, is there?
I sell softeners all over the US and find hardness in the mid 20 gpg frequently with some in the high 30s or higher in certain places.
I have installed many softeners etc. in confined spaces and can tell you that you will have a tough time getting one to fit that small hall closet. So think on installing on the main before the manifold somewhere else. Like in the garage or outside if your area doesn't have hard freezing weather.
BTW, to clean a tankless takes acid IF the coil is metal it can be damaged with only a few cleanings. It is not much fun and can be needed very frequently if the water is hard.