Reese

I found this interesting article on pennyroyal. It mentions using dried, crushed leaves of pennyroyal to repel fleas.

I would leave it alone though.

Pennyroyal taxes the liver and can be fatal if ingested in large amounts. The wiki article on pennyroyal has toxicity cases, but most involve direct ingestion of either large amounts of leaves or the essential oil of the plant, which most sources agree should be avoided entirely.

There are safer options however.

I've had moderate success deterring sugar ants by spraying a peppermint-infused apple cider vinegar at their entry point after using crushed mint leaves as a barrier until they stopped entering.

Reese

You would be better off building new flowerbeds a few inches away from the brick. So that you don't get pests like termites.

Never build flowerbeds or lay dirt against the exterior of a house.

Dirt is wet and water will get through the brick and into your sheathing, framing, insulation, and eventually inside the house and creates all kinds of problems. I had to rework a lot of brick and sheathing due to the previous owners doing this.

Don't use rocks.

Build them out of pressure treated lumber. They can be against your house, as long as the PT is there as a barrier. You don't want to build three walls and use your house as the third.

If they already have four walls, you can build an add-on box to put on top of your existing.