Let $I$ and $J$ be the centers of the incircle and the excircle in the angle $BAC$ of the triangle $ABC$. For any point $M$ in the plane of the triangle, not on the line $BC$, denote by $I_M$ and $J_M$ the centers of the incircle and the excircle (touching $BC$) of the triangle $BCM$. Find the locus of points $M$ for which $II_MJJ_M$ is a rectangle.
To find the locus of points \( M \) for which \( II_MJJ_M \) is a rectangle, we need to analyze the geometric properties of the given configuration. 

1. **Identify the centers of the incircle and excircle:**
   - Let \( I \) be the incenter of \( \triangle ABC \).
   - Let \( J \) be the excenter opposite to \( A \) of \( \triangle ABC \).
   - For any point \( M \) in the plane of \( \triangle ABC \) (not on line \( BC \)), let \( I_M \) be the incenter of \( \triangle BCM \) and \( J_M \) be the excenter of \( \triangle BCM \) opposite to \( M \).

2. **Analyze the angles:**
   - We need to show that \( \angle II_MJ = \angle IJ_MJ = 90^\circ \) for \( II_MJJ_M \) to be a rectangle.
   - Note that \( \angle II_MJ = 90^\circ \) and \( \angle IJ_MJ = 90^\circ \) imply that \( I \), \( I_M \), \( J \), and \( J_M \) form a cyclic quadrilateral.

3. **Cyclic quadrilateral condition:**
   - For \( BI_MIC \) to be cyclic, the sum of opposite angles must be \( 180^\circ \):
     \[
     \angle BI_MC + \angle BIC = 180^\circ
     \]
   - Since \( \angle BIC = 90^\circ + \frac{\angle BAC}{2} \), we need:
     \[
     \angle BI_MC = 90^\circ + \frac{\angle BAC}{2}
     \]

4. **Angle relationships:**
   - If \( \angle BI_MC = \angle BIC \), then:
     \[
     90^\circ + \frac{\angle BAC}{2} + 90^\circ + \frac{\angle BMC}{2} = 180^\circ
     \]
     Simplifying, we get:
     \[
     \angle BAC + \angle BMC = 0^\circ \quad \text{(which is impossible)}
     \]
   - Therefore, we must have:
     \[
     \angle BAC = \angle BMC
     \]
     This implies that \( M \) lies on the arc \( BAC \) of the circumcircle of \( \triangle ABC \) that does not include \( B \) and \( C \).

5. **Conclusion:**
   - If \( M \) is on the arc \( BAC \) of the circumcircle of \( \triangle ABC \) (excluding \( B \) and \( C \)), then \( II_MJJ_M \) is a rectangle.

The final answer is the arc \( \boxed{ BAC } \) of the circumcircle of \( \triangle ABC \) excluding points \( B \) and \( C \).