Final answer:
To ensure data integrity when displaying a text field from Object Y on Object X, a cross-object formula field should be created on Object X.
Step-by-step explanation:
If Object X has a lookup field to Object Y and X needs to display a text field from Y to ensure data integrity, the developer should create a cross-object formula field on Object X that retrieves the value from Y. This approach does not require any coding and maintains real-time accuracy of data by automatically displaying the current value of the text field from Object Y on Object X. Rollup summary fields are used to perform calculations on child records and hence are not applicable in this context. Using Apex or a workflow rule to copy the text field's value from Object Y to a text field on Object X requires additional configuration and can lead to data integrity issues if not properly maintained.