I don't think this quite works because of relativistic addition of velocities. Naively, it seems to. For example, if the object was travelling at 0.999999c relative to you (appears to be 1.0c according to your limited instruments), then you accelerate to 0.50c in its direction, you'd see its speed reduce to 0.50c (same 2s.f. instrument), which would clearly prove it's not massless. But velocities don't add like that relativistically and I think you'd still see it as travelling at 1.0c because it only decreased a tiny amount, below what you instrument can detect. If you use a more precise instrument or a faster rocket, you might measure it as 1.00000c but then you still won't know if it's exactly c or a smidgen less.
Maybe I've got my relativistic velocity addition wrong? But it still looks like the same measurement problem as trying to prove a classical object has a speed of exactly 0, which can't be done no matter how accurate our instruments are.