The pro-Zelensky crowd likes to quote Medvedev. Why? Does he rule Russia?
No, but he is the hand-selected deputy of the guy who does. Medvedev is the Deputy Chairman of the Security Council of Russia, which is the national security/defense body in Russia of which Putin himself is Chair.
So if Putin himself selected Medvedev to be his deputy chair on national security issues, it seems perfectly reasonable to quote Medvedev on Russian foreign policy and national security issues. If Putin disagrees with any of his own deputy's public statements, there are a variety of ways he can make that disagreement clear.
Otherwise, it is perfectly fair to infer that Medvedev's statements have his boss's approval.