"There used to be sugar in this office." What's wrong with this sentence?
I think it is possible, but this expression usually means “there was” or “there were” or for time “it was”. Try reporting it. https://www.thoughtco.com/il-y-a-vocabulary-1371268
Scroll all the way down for some examples that support your translation: https://dictionary.reverso.net/english-french/There+used+to+be
Include the last two links in your report.
But then again, the imparfait is used to express habits in the past. I would use "Il y a eu" for the action, and "Il y avait" for the habit.