Vanilla game: no for a yarn. And yes for cord.*
Modding a simple recipe to unravel some cloth to yarn shouldn’t be too tricky...
* or you could make a bowstring using cord, which is possible in vanilla. Just select cord when making bowstring instead of yarn, and you’re golden.