Step 1: Read the two clues.
We want a halide that has octahedral cleavage. It must also scratch calcite but be scratched by quartz.
Step 2: Turn the scratch test into hardness.
Calcite is hardness 3 and quartz is hardness 7. To scratch calcite the mineral is above 3, and to be scratched by quartz it is below 7. So its hardness sits between 3 and 7.
Step 3: Use the cleavage clue.
Halite and sylvite both break in cubes, not octahedra, and both are very soft near hardness 2. Fluorite is the halide famous for octahedral cleavage.
Step 4: Check fluorite hardness.
Fluorite has hardness 4. That is above calcite and below quartz, so it scratches calcite and is scratched by quartz, just as asked.
Step 5: Final choice.
The halide that fits every clue is fluorite.
\[ \boxed{\text{Fluorite}} \]