It sounds like what my dog had ,it's called cherry eye and the only recourse is surgery. It's a fairly simple procedure. the vet just stitches the lower eye lid back in place.
Dogs don't have 3 eyelids. You need to get him to the vet, there's something going on. Good luck.