Memref is not a pointer. You cannot just pass a memref to a function that takes a pointer and expect that to work. You can check the documentation LLVM IR Target - MLIR and use the memref ABI.
If you want a pointer you can now memref.extract_aligned_pointer_as_index and pass that around.
If you want to use it at the LLVM dialect level you can additionally inttoptr.
This is not something expected to happen in general, a memref is more complex than a pointer and require metadata with it. We’ve been cautious in this area because this is abstraction-breaking, most people who have this kind of situation have been very specific and in general better of handling it with their own conversion op.