My local yarn expert here on the couch with me says that you can probably machine wash it at home, as long as it’s not unraveling. If it’s acrylic or cotton, then no problem. If it’s wool you should use Eucalan, Woolite, or something like that. The burn test is good at distinguishing what it is. Another, non-destructive option, is to dip the whole thing, or a corner, in water. Acrylic should not absorb any water, and will dry pretty quickly. Wool will absorb some water, and will probably smell a bit. Cotton will absorb a lot of water, like a towel would. We wash our acrylic afghans, knit and crocheted, whenever necessary in our front load washer, but we did it in the top load, too.
I’m also told, you can try taking it to a good local yarn shop “check on Ravelry for recommendations” as opposed to a hobby or crafts store which happens to sell yarn. They should be able to identify the material for you.