Can I take the oath if I was arrested after my interview?
Possibly, but you must disclose it, and USCIS can postpone the oath to review whether you still show good moral character.
Not automatically. An arrest after the interview does not by itself cancel an approved N-400, but you must answer the questions on the oath notice honestly, and USCIS can postpone or cancel the ceremony while it checks whether you still show good moral character. Good moral character is required through the oath, not only through the interview (INA 316(a)).
The question on the notice
The Notice of Naturalization Oath Ceremony (Form N-445) includes a questionnaire. It asks whether you have been arrested, cited or detained by any law enforcement officer since the interview, among other things. You answer it at the ceremony, under the same obligation to be truthful as in the interview. Answering "no" to a question that should have been "yes" turns a problem that might have been manageable into a false statement, and that can be a ground for denial and later action.
What USCIS does with a "yes"
The officer checking the questionnaire generally sends you back to the adjudicating office rather than letting you take the oath on the spot. The office may ask for court records, a police report and a final disposition. An arrest that ended with no charge, or a dismissal, is treated differently from a conviction, and neither is a bar in the same way as a serious offence. A pending charge is the hardest case, because there is no disposition yet, so USCIS commonly holds the case until there is one.
What matters in the record
The final court disposition, certified by the clerk, and whether a plea was entered.
The nature of the offence, since some offences are permanent bars and others are weighed.
Whether any probation, parole or suspended sentence is still running (probation blocks approval until it ends).
Whether the conduct is itself an unlawful act that suggests you lack good moral character.
A guilty plea, or a deferred adjudication that includes a finding and some penalty, is a conviction for immigration purposes even where state law says otherwise (INA 101(a)(48)(A)).
What readers in this position do
They gather the paperwork before USCIS asks, tell the office in writing about the arrest and bring certified records to whatever date is set. Some offices schedule a short follow-up interview. Others deny the N-400 and leave the applicant to file Form N-336 or a new application.
Because a green card holder can also be removable for certain offences, a new arrest is a moment to see an immigration attorney before returning to the office, not after. The attorney can also tell you whether a plea you are considering would change the outcome.