You're looking at this the wrong way. You say you don't want to burn bridges, but what value do those bridges have for you? You say that working from the office is a deal-breaker for you, to the point that you want to resign from the company over it. If this is your position, then, even if, in future, you were to come back to this company, you'd have to still work from the office, which would be a deal breaker for you. That's not going to change. Which is a long way of saying that you're never going to come back to this company because their policy of working from the office is too distasteful for you.
So, the root of the question is: Why do you not want to burn the bridges? The answer to this question becomes much easier if you don't care about burning the bridges, and here it is:
Submit your resignation whenever you feel like resigning. It's not your job to worry about company continuity, that's the job of upper management. If your company demands everyone to work from the office, and their entire workforce quits because of this, then perhaps the company should not have demanded everyone to work from the office. That's the company's problem, not the problem of the people who quit. You have no responsibility, inferred or otherwise, to ensure company continuity. If you want to quit, then quit.
Once you've submitted your resignation letter, adhere to whatever other requirements are stipulated in the contract, e.g. notice period or whatever. Don't break your contract, do what you are required to do. Then leave. That's it.
The company will do whatever the company will do. Perhaps they won't write you a reference letter; whatever, if they're going to be petty about that then they can be petty. If you're scared of the company being petty then don't quit and adhere to their rules about working from the office. You have no control over them being petty, so either you keep working for them and work in the office to avoid them being petty, or you quit and take the risk that maybe they become petty. Those are really your only 2 choices if this is a concern for you.
As for other requirements like confirming employment and so on, there are (in most locales, not sure about yours) legal requirements for what employers must do with regards to that sort of thing. For example, in Canada (where I live), an employer must confirm employment dates of ex-employees and must not provide any additional information about those employees to prospective future employers, even if asked, and they can be in legal trouble if they don't adhere to those rules. Your locale may be similar. If you want to know more, contact a lawyer. Whether you "burned a bridge" or whatever has no bearing on your company's legal requirements in this way, they still have to do this even if they hate your guts.
That's all. So the real question is, what are you losing by worrying about burning this bridge, and is it worth it to you? My advice is to not worry too much about it as long as you adhere to your contractual obligations.