Yes, substances like hydrogen peroxide can act as both depending on the chemical environment and the reacting species.