Since 3 numbers are known to Ashley, the missing 4th can be one of the remaining 24 (since all 4 are unique).
Ivan can name 3 shared numbers in 6 different orders, and can insert the secret one in 4 different position (before 1st, after 1st, after 2nd, after 3rd), so we get 24 different combinations, so, it's a bijection, and Ashley can always guess the secret number.
Example of an arrangement:
Let $A$, $B$ and $C$ be the shared numbers, and they are ordered such $A<B<C$.
Consider the following table, which can serve as an arrangement:
Sum up the numbers which correspond to the true sentences, and add to the answer the number of shared numbers which are less or equal than that answer.
- order is ABC = 1
- order is ACB = 2
- order is BAC = 3
- order is BCA = 4
- order is CAB = 5
- order is CBA = 6
- missing number on 1st position = 0
- missing number on 2nd position = 6
- missing number on 3rd position = 12
- missing number on 4th position = 18
For example, Ivan can say to Ashley:
The numbers are 8, 16, X, and 5. You must guess the X.
So, Ashley deducts that the order of numbers is $BCA$ (since $5<8<16$), and the missing number is named on third position. So the answer is $4+12=16$. Since all 3 numbers are less or equal than 16, Ashley adds 3 and gets the secret number: 19.
Note: The last step is used to map the 24 numbers from 1 to 24 to the 24 numbers from 1 to 27 except the already named numbers, namely $\{1,2,...,24\}\to\{1,2,...,27\}\setminus\{A,B,C\}$
Edit: Since Ivan has the freedom of what number he can remove, he has 4 times more possibilities than there are at first glance. So he can "encode" it without including the unknown number into the message (for example, remove the number based on the sum of all 4 numbers modulo 4 - if they sum to $4n+1$, remove the smallest number, $4n+2$ - 2nd smallest etc.), reducing the number of possible variation to no more than 6.