I was trying to solve this question and came across this idea that I can take any point as the axis for writing the Torque= d(L)/dt as long as the total force on the system is zero.
This is how I understood it - only the COM frame is inertial but I can take other points, like the centre of the rod in this case, as axis because it would give the same answer.
The proof of this is -