Selectively bringing constructors or record fields into scope

I would like to bring constructors and record fields into scope selectively.

Consider:

module M = struct
  type t = { foo : int }

  let ( = ) a b = a.foo = b.foo
end

let () =
  let open M in

  let _ = { foo = 5 } in
  assert (1 = 1)

This will fail to compile:

File "./demo.ml", line 11, characters 10-11:
11 |   assert (1 = 1)
               ^
Error: The constant 1 has type int but an expression was expected of type M.t

An issue I ran into before, as discussed in the other thread.

So I was curious if I can bring constructors and record fields into scope selectively, i.e. picking which items of M are brought into scope.