Yes. Selling direct equity positions at a realised loss offsets capital gains from other positions in the same financial year – reducing your net taxable gains for that year. You can then reinvest the proceeds. This only works within the same financial year, so timing matters.