I get my grudge maps for Texture Labs as there’s a ton of free grunge images, then go to the Grungy Masks tab on the left.
Steps
Import the image and make sure it covers the whole desired element, Do not stretch the texture without aspect ratio, it makes it look ugly and unrealistic.
Rasterize your element.
Go to the select tab while selecting the grunge texture, and select color range, and change the mode to shadows.
Click back on your element and click delete on it.
Use Control D to unselect and delete the grunge.
If you want it to only go on the edges, you can copy the same object before the process then use a gradient texture from its original color to a transparent color.