For example can one get another license in a foreign country?
Which countries allow that?
It completely depends on the condition. Just because you're denied a FAA medical it doesn't automatically mean you can't get one to operate in another country.
For example, colour-blind pilots can fly up to First Officer level in Australia, and we have no mandatory retirement age. But we are stricter on things like head injuries.
It's possible. One example: Bob Hoover got an Australian license and medical certificate while his US medical was revoked.