Something like halloumi can be fried directly, other firm cheeses melt before it's done. Can they be treated somehow so that they don't melt too soon?
It really depends on what you qualify as 'fried'.
You can take hard grating cheeses and sprinkle it on a sheet pan (preferably with parchment or silpat), and bake it around 300-400°F (150-200°C) to get a cracker-like item (search for 'parmesan crisp' recipes). If you remove it while it's still warm, you can roll it into a cone or tube, lay it over a bowl or cup, etc.
For pan frying, you can coat it in flour or cornstarch, then brown on all sides (or at least top and bottom if you sliced it thinly), but you might need to let it cool down between sides to firm back up. You might get away with rolling it in corn meal, but it's also a function of the cheese.
If you have an air fryer or a convection oven, you can do a three part dredge and then bake it at high heat, but you may need to freeze the cheese before baking so it doesn't melt too fast.
For deep frying, you'll likely have to batter it.
You can also look for other non-melting cheeses (feta, ricotta salata, paneer, etc)
I've a partial answer actually based on the reverse of the question, how to make cheeses melt well. I've found that moisture really helps when getting cheese to melt nicely (as opposed to dry out or even separate).
So, if your cheese is a bit drier, it is more likely to firm up and thus fry instead of melt. It need not be dry all the way through, either, if you leave cheese uncovered for a while, the surface will start to dry out, leaving a thin "crust" or perhaps I mean rind (experience tells me so). I suspect, therefore, that a piece of cheese so dried around the edges would be fryable... perhaps the inside will melt and be soft and gooey but that dry crust should firm up with browning and so contain the softer inside - much like if one was battering or breading the cheese.