There is no reason not to, except it can be a pain to make it work.
You need enough clearance for the chain. You need a good chainline. It depends on the spacing of your crank and the bashguard. It will take some time but try things out.
One of the hardest things is finding right sized bolts, spacers (washers) and the nuts. These are surprisingly hard to come by and expensive, but you may be lucky if you're local bike recycling shop has the right size set for you.
I've done some weird things to make this work. I built a hardwood bashguard on my milling machine (plus epoxy finish) and installed it. It was just a pant protector, and for looks as I had other wood on the cargo bike to match. This was a mistake as the wood crushes over time the then the bolts get loose. Surprisingly it lasted a long time before happening. Then I replaced with a metal manufactured bashguard and it also came loose. The reason is probably the very bolts and washers, also the nuts and bolts I was able to find were kind of random and didn't fit together super tight. Also on a single ring when you always use that (biggest and smallest) ring it wears faster than if you were attaching to the big ring of a 2 or 3 ring crank. If you have the choice I would strongly recommend a 5 bolt crank/rings such as 94, 110 or 130.It will just spread out the load better. Also I recommend the chainring nuts that use M6 instead of the two notches as you can torque them more carefully (use grease!), however they tend to also have less range of thread insertion so it might make it harder to find the perfect size.
One interesting thing I found out is that a normal SHCS M4 bolt will pass through the hollow chainring bolt clean and snug. So for the next wood bashguard I attached the chainring to the crank more normally, then added the wood bashguard using long SS M4 bolts through the centers. This worked much better and I've had no complaints from the users of that bike. However, I did have to make the clearance and holes different than a normal bashguard it doesn't resemble a toothless chainring so much anymore. It's easy with wood, but not metal. You could do it with metal with some big fancy conical washers I bet.
Anyway, play around with parts, have fun and try it, I recommend. Unless your trying to do something easy and simple, in which case, don't. But if you get it right it stays simple and lasts forever.