@INIREAD returns the item's value, unless there is an error -- the file doesn't exist, the section doesn't exist, etc. -- in which case it's supposed to return -1.
@INIWRITE, by contrast, is supposed to return 0 or -1; not the value you've written. If you don't want the 0 or -1 in those variables, then don't use those variables. (I often use a variable RV for "return value", which I can check later if I want to.)
Finally, SET should have one equals sign, with no spaces. (It seems to work as written, but it's always safer to use the documented syntax.)
~\Work> type test.ini
~\Work> set x=%@iniread[".\test.ini",xyzzy,foo]
~\Work> set x
~\Work> unset y
~\Work> set y == %@iniread[".\test.ini",xyzzy,foo]
~\Work> set y
y == 123
~\Work> echo %y%
ECHO is OFF
~\Work> echo %[y ]
SET X == anything
does not set envvar X at all. It sets a variable whose name is X followed by a space.
The first = terminated the name of the envvar (ending in a space) and the second = became the first character of the value.