Most foals will allow and solicit this while they are loose in a stall, pen or pasture. But foals have many reflex reactions to touching in other parts of their bodies, that they don't automatically like petting and scratching. You need to over-ride their natural sensitivity to touch in some areas and let them learn it is not a threat and can be enjoyable. A week old foal would rather be petted with the flat of the hand along his neck, hindquarters, and forearms. Scratching or ticking in those areas might make him squirm at first.
Many foals display curling, rounding of the back, bucking, head shaking etc.
Start with what feels good to the foal to gain his trust and show him you are not a threat. Then, keep gradually adding areas. Yes, I do that from the day the foal is born to show the foal he can be restrained and that it is nothing to fear. And, as you say, while the foal is still small enough to hold. Be sure you don't KEEP a grip on the foal once he is standing still.