A 44-year-old man presents to his GP with a 3-month history of alternating constipation and diarrhoea, with tenesmus and rectal bleeding. He has lost 4 kg in weight. Examination reveals a palpable mass in the left iliac fossa. What is the most appropriate next step?