Only in principal ideal domains (PIDs). If by number ring you mean Dedekind domain, then all its localizations at prime ideals are discrete valuation rings (except the one at 0 which is a field), which are principal ideal domains. So every ideal in a Dedekind Domain is locally principal. But of course there are Dedekind domains that are not PIDs!