That's a difficult question to answer.
The research would appear to show that people with an intellectual disability understand the death of people around them. That's pretty clear. They can deal with and live with such situations. What is less obvious is whether they are capable of understanding the irreversible aspect of their own death. That's when we find ourselves in a grey area that is very difficult to sort out, as you've just said.
In Quebec, the difference between medical consent and legal consent, in terms of signing a contract, for example, is established by means of tests to determine their understanding of the medical procedures at issue. To my knowledge, there is no perfect tool to determine whether a person is capable of understanding their decision to request medical assistance in dying. It really depends on the severity of the intellectual disability.