Depends on the car, and depends on what you mean by "off". But yes, OBD II ports do have functionality beyond mere smog testing.
A number of systems in the car need to be powered up, such as the thermostat controls, the interior fan, and the radiator fans. So the car will need to be in "accessory" or "run". Running in true "off" is an impossibility, unless we are talking about an RV or "VanLife" build, in which case it could have a separate electrical system for the accommodation area, and hopefully a more efficient A/C than the typical automotive system.
Air conditioning takes a lotta lot of power, so the vast majority of cars use an A/C compressor driven off the engine's belt drive, which means the engine must be spinning.
Electric A/C is starting to show up, but it takes vastly more power than a common car battery can possibly deliver. Therefore the only way it can run off battery is from a large battery such as a hybrid or electric vehicle. Hybrids need to be able to run the A/C off the battery, since otherwise you'd be spinning up the gas engine just for that in city driving.
Lastly, if your goal is to protect a dog or baby in the car while you are away from the car, forget it. Good Samaritans will have no idea the A/C is on, and will smash windows to save the being. And the cops will come, and you will get a ticket and the Good Samaritans will have legal immunity. They couldn't have possibly known.