If I could make it back to the office, I would come.
Should I use could or can here?
Yes, it is correct if you are explaining that you cannot do something that you promised to do.
The idea can be abstracted as
EDIT: responding to comment regarding can vs could
The could / would pairing implies a known current situation.
When replaced by can / will, the sentence becomes about an unknown current situation.
Telling someone that you may come back to the office: If I can, I will. I'll have to see if my replacement gets here in time.
Telling someone that you want to go to the office but something (outside your control) is preventing me: If I could, I would. But my boss told me I need to stay here.