Rather than returning the path alone, you can return a fully formed conky statement to display the icon. For example, if I have a Lua function that returns an image statement, such as...
function conky_myimg()
local path = "/home/David/System/Icons/StuffedTux.png";
local s = "${image "..path.."}";
return s;
end
...and I call the function in my `conky.text` with the line...
${lua_parse myimg}
...then the icon is displayed by conky.
![Icon displayed by conky](