WiFi.setOutputPower();
The actual WiFi range is highly dependent on many more factors than just the TX power:


The antenna gain, directionality, and orientation of the receiver
The antenna gain, directionality, and orientation of the transmitter
The proximity of radio-reflective objects nearby (metal)
The proximity of radio absorbing objects nearby (humans)
RF Black Magic


In practice, test your situation by running a series of tests at lower and lower power settings until you get an unreliable connection, then bump it up a couple of notches from there.

Do not rely on transmitter power for security, however. You cannot stop someone from pointing a high-gain antenna at your device and communicating with it from a distance farther than 1 meter. TX power reduction should primarily be for energy conservation.