It's hard to find large pieces of closely knit food safe cotton where I am. (UK / EU)
Can I use pieces of undyed 100% cotton bed linens with tags removed instead?
What chemicals if any would the fabric be treated with?
If you wash them first, there's no reason you can't. Muslin is just fabric. It doesn't even necessarily need to be undyed (although it can matter what color the dye is), and doesn't necessarily have to be cotton (although some synthetics won't pass enough moisture).
Another option is baby muslins (unless you need enormous pudding cloths). They're often undyed, and you can find unbleached. To be honest though, cheesecloth is easy to get hold of online anyway, or a decent kitchen supply shop should have it (certainly Lakeland and John Lewis stock it). One of my cheesecloths is perhaps a little thin for some culinary uses, but the other isn't
Bedsheets are a good choice for jam filtering and pudding making. When you buy new sheets there may be some residual chemicals from the production process (formaldahide, dyes, etc), which is why it's recommended to wash them first before using them in most cases. However, by the time you would use them for that purpose (presuming well used sheets) the only chemicals left would be from washing, life detergents and fabric softeners. Many of these products have scents added which could potentially transfer to your pudding. The way to avoid this is to wash the sheets in clear water with no detergents or fabric softeners of any kind.
I personally would not use them. Yvonne Chouinard claims in "Let my people go surfing" that a brand new 100% cotton T-shirt actually consists of only 73$ cotton and the rest are chemicals. I find such a high number hard to believe, but the cotton industry is well known for being very pesticide- and herbicide-intensive, and there are lots of treatments applied to the yarn and the fabric during production, some as dangerous as formaldehyde or dioxin. So, unless you are buying GOTS-bedsheets or something with similar standards, I wouldn't use them in applications where they touch food, much less where the liquid part of the food is soaked in them.
It is not really hard to find untreated cheesecloth online in Europe. There are small stores that specialize in natural home textiles, but I've seen it on Amazon too. I suggest that you get a product that was intended for this specific use, and be certain everything is OK.