You are correct. The provider should be documenting that the anemia is caused by the malignancy. It is not an automatic linkage.
In the ICD-10-CM alphabetic index, these are the only terms listed immediately under the main term Anemia using the word "With". This means that the 2 conditions listed below are the only ones for which linkage is assumed. (Note that malignancy is NOT listed there):
Anemia (essential) (general) (hemoglobin deficiency) (infantile) (primary) (profound)D64.9
This is from the "With" convention of the ICD-10-CM guidelines:
For conditions not specifically linked by these relational terms in the classification or when a guideline requires that a linkage between two conditions be explicitly documented, provider documentation must link the conditions in order to code them as related. The word “with” in the Alphabetic Index is sequenced immediately following the mainterm or subterm, not in alphabetical order.
Note also that the ICD-10-CM guidelines for Chapter 2 Neoplasms state to "use the appropriate code for the anemia," and then gives D63.0 as one example. Remember that there's more than one anemia code that could be used in oncology. You don't know if the neoplasm was caused by chemotherapy (D64.81 or D61.1), the neoplasm (D63.0), or something else entirely if the provider doesn't state that specifically in the documentation.
1) Anemia associated with malignancy
When admission/encounter is for management of an anemia associated with the malignancy, and the treatment is only for anemia, the appropriate code for the malignancy is sequenced as the principal or first-listed diagnosis followed by the appropriate code for the anemia (such as code D63.0, Anemia in neoplastic disease).