I understand paint pens hold up better than a marker, and won't rub off onto fabric. Perhaps marking on the top of the ruler would work, so any rubbing off would be on your fingers, not the fabric. I've also seen rolls of thin colored strips of cling film at Joanns for marking rulers.