Yeah, you can, but you gotta be careful. Fine dust like ash will clog the filters almost instantly if you don't prep first.
Make sure the dust cup is completely empty and the foam and felt filters are clean and bone dry before you start. Go slow, don't just dump a pile of ash into it. After you're done, empty the dust cup immediately—like, right away—and be prepared to wash the filters again because they'll be coated.
The real issue is that super-fine debris can bypass the filters and get into the motor, which is bad news. For large amounts of ash, you're honestly better off with a shop vac designed for that. For small amounts, the Shark can handle it, but expect to do filter maintenance right after.