Is it compulsory to introduce the answer of a fugue at +5 or -4 scale degrees relative to the home key? I'm not asking whether it's necessary to transpose the answer; my question is whether transposing to the said degrees is a must or is it flexible?
If you're imitating Bach's fugal practice and writing in the 18th-century style (which you seem to be based on the baroque-period tag), then yes, you'll state the answer at the level of the dominant.
Later on in music history, composers felt more free to compose their answers at other pitch levels. This is especially true in the twentieth century fugue, but we even encounter it occasionally in the 19th century. Once you get to writing fugues in this latter style, you should feel more free to write your answers at pitch levels other than the dominant.