set right permission to get connection ip for a user mapped to login
sys.dm_exec_connections will require the permissions you've stated of VIEW SERVER STATE. However, by looking at the code you only ever want to get the IP of the session the user is already in, so there is no need for the over-provisioning. Using CONNECTIONPROPERTY will fulfill the same request and NOT require any extra permissions.

I'd make it something as such:

CREATE PROCEDURE TestProc
AS
BEGIN
 SELECT CONNECTIONPROPERTY('client_net_address')
END

GRANT EXECUTE ON dbo.TestProc TO TestUser


You can then test:

USE YourDatabase
GO

EXECUTE AS LOGIN = 'TestLogin'
 EXEC dbo.TestProc
REVERT