It might be the most likely, but I can't see why the phone number is any more logical than the office number. It depends entirely on the OP's meaning because the answer is different. If it's the phone number, then both are used. If it's the office number, then I'd hazard a guess that very few people would say "the number for the office".
Assuming that it is the phone number, how to understand the word "for" here?
"... how can/should I understand the word 'for' here?"
"... how is the word 'for' understood here?"
There are other possibilities for writing this sentence grammatically.
This is the number for the office.
Does it mean "This is the number allocated for the office."?
You could understand it as "the number for (phoning) the office".