Technically yes, they have similar flavors and textures. One of the downsides is that halloumi tends to hold its shape through baking due to its high melting point, whereas mozzarella will get much meltier. In general, mozzarella is a fine substitute, but I recommend using halloumi for this halloumi salad.