Attempt #2:
Less of a stretch this time
You are a
Span?
Reasoning:
I might be found within a flag,
Some flags are used to mark the span of a bridge. Other flags may depict the land of the state, or their territorial span. Or they include formation dates to indicate their span of existence. (This one's probably wrong) Star-Spangled Banner refers to a specific flag.
or within a wardrobe made for drag.
Spangles are a thing, right? -- Answer is spandex/spanx
You can find me on your hand,
Span: The distance between thumb and little finger when fully extended. Mine is 9" +/- 1/8".
in a pet that hunts through woodland.
Cocker Spaniel
I can be found on most sites,
I'm no web developer, but the <span>
tag is commonly used I think? I don't know how you could say most sites though.
look for me past the twirling tights.
Is Spanx a common brand of tights? Past tense of spin (twirl) is span.
Read me wrong, I'll make you sleep,
Span backwards is naps.
you cannot measure me for deep.
A span measures a unit of distance, not depth. (Although thats a tad arbitrary, there might be a better answer here)
A country if you squint your eye,
Spain?
I end when you eventually die
Lifespan is over upon death.
Attempt #1:
Bit of a stretch, but here goes:
You are a
Pole?
Questionable reasoning:
I might be found within a flag, -- Some flags fit around a flagpole instead of simply hanging on them
or within a wardrobe made for drag. -- Many wardrobes have horizontal poles for hanging clothes
You can find me on your hand, -- The latin for a thumb is pollex?
in a pet that hunts through woodland. -- Isn't there a type of polish hunting dog?
I can be found on most sites, -- Most government sites have a flagpole
look for me past the twirling tights. -- Many practicing ballet rely on a horizontal pole for balance/stretching
Read me wrong, I'll make you sleep, -- Replace the oʊ sound with an ɪ sound and you get pill. Some pills make me sleep at least.
you cannot measure me for deep. -- I might measure a poles length or diameter, but probably not it's depth.