It depends on what it is made out of, but generally, if it is made of either acrylic or wool, or some blend of the two (these three variations are the most common materials for afghans) then it’s dry cleanable.
If there’s a little end of yarn you can snip without damaging the blanket as a whole, you can also try a simple burn test. Hold it to a flame. Acrylic will melt into a blobby plastic end; wool will burn briefly into ash with a “burnt hair” smell. (more comprehensive burn test flowchart probably uneeded for your purposes).
)