Not sure what the homework problem was here. As given above, it supplies its own answer - 500ml!
A liquid volume is that volume irrespective of the nature, including density, of the liquid itself. So a 500ml flask will hold 500ml of cooking-oil, or of water, or of any other fluid. The mass will differ with density, but the volume is constant.
It was a strange question because we were not told anything else about the oil and bottle, so we don't know (unless Element now tells us) if it was supposed to be a basic physics question or an exercise in logic as you imply.
I didn't answer this right away because I think there's a trick in this question but I'm just not smart enough to figure out what it is or I'm completely missing something.
I think the trick might be in Element99's improper notation of units. It should be 500 ml, not 500ml.
I must admit I'd not spotted the missing space, but I don't think that is significant here, nor part of any trick Element99 might be playing. He might have missed something though - the rest of what he says was a homework question.