When another civ is using free religion, the upside is that you don't get a "heathen religion" penalty when you're still running a state religion. The downside is that you don't get a "care for our brothers and sisters of the faith" bonus to relations either. Once those are gone, a good relation can be maintained by gifting gold/techs/resources. If no military aid is possible, you can try keeping your friends friendly by refusing to trade with their enemies -- this includes closing your borders to their rivals. Of course, this will give you a negative to relations for those civs instead.