Extra references hide in some unconspicuous places:

   - on the stack when you pass the value as argument
   - on literals
   - on hidden stack levels in case of [interp alias]
   - etc.

In your case, the one that's striking is the literal. Use [expr rand()] to generate a value that will not be stored as a literal.
Then of course the var itself holds a reference. To nuke that one too, use the K-free-K idiom $x[unset x].

Wrapping up:

% proc f {} {set x [expr rand()];puts [tcl::unsupported::representation $x[unset x]]}
% f
value is a double with a refcount of 1, object pointer at 0x8fe4ec0, internal representation 0x1cfea9a0:0x3fef54d0, no string representation
% namespace eval B {
variable var_B [expr rand()]
puts [tcl::unsupported::representation $var_B[unset var_B]]
}
value is a double with a refcount of 1, object pointer at 0x86e9910, internal representation 0xab242eb7:0x3fc2175b, no string representation