You can also get a piece of 1/8" plywood, or some rigid plastic and put is between the spray and the tree, and keep moving it around the tree as you spray.
There are herbicides that will make the ground sterile for a year or more.
Then there are things like brush-b-gone that kill bigger plants.
Then there is round up that will kill pretty much any weed or grass as a systemic. It will also kill things like ice plant (pickle weed) as a contact agent, but not as a systemic agent. A small tree might react either systemically (though contacted bark or leaves) or by contact only affecting the parts actually contacted. Different woody plants react differently. I have seen it sprayed on some flowering plants with no affect other than changing the color of the flower.
Then there are ones mentioned my gorgi that kill weeds, but not grass, or weeds and crab grass, but not regular lawn grass.
The bottom line is that avoiding actual contact should greatly reduce or eliminate the problem.
I have removed Bermuda grass mechanically or physically (without chemicals), but it is a long, labor-intensive process that may take several seasons. Mow it short or weed whack it to as short as possible; roto-till it as deep as you can, sift or rake out as much as you can; water deeply to force the roots and stolons left behind to sprout, and then deal with them as they appear. The small pieces, if they have even one node, will stay dormant for a long, long time and will resprout when they finally are watered (irrigation or rain).