Allowing urges for foods you don’t have access to

I’m working on allowing urges to stop overeating. I am having a strong urge for cookies, but there are none in the house and I can’t leave right now. If I sit with the urge and feel the feelings, even if there would be no way for me to actually have the cookies, can I still count that as an allowed urge?