If you need to previous value for the reference selector, add an onchange event to the reference selector that triggers a microflow. In the microflow perform a database retrieve action with the xpath like:
[id = $inputobject]
to retrieve the value of the object from the database.
Now you can compare the value of the association in a decision, to see if the value has been changed.
If you need to compare data on entity B then retrieve the entity B from the inputobject and from the databaseobject and perform the needed compares.
Hope this helps in finding a solution for your requirement.