The right-hand side of the assignment is a dereferenced pointer, and this is an lvalue, so there no problem binding an lvalue reference to it. The standard specifically gives the example of a dereferenced pointer in its definition of an lvalue (3.10/1):
An lvalue (so called, historically, because lvalues could appear on the left-hand side of an assignment expression) designates a function or an object. [ Example: If E is an expression of pointer type, then *E is an lvalue expression referring to the object or function to which E points. As another example, the result of calling a function whose return type is an lvalue reference is an lvalue. — end example ]
There is no undefined behavior because i
refers to a valid object.
Your question about delete
is covered here.