You can do so indirectly, and RAI maybe even directly.
Modify Memory states:
You can permanently eliminate all memory of the event, allow the target to recall the event with perfect clarity and exacting detail, [...]
This allows you to question the creature about a certain event, although you have to be aware of the event itself to do so - but a generic description like "your 20th birthday" or "2 hours ago" is sufficient for that.
Furthermore, the spell Encode Thoughts states:
If you cast this spell while concentrating on a spell or an ability that allows you to
read or manipulate the thoughts of others (such as detect thoughts or modify memory), you can transform the thoughts or memories you read, [...]
In my interpretation, this strongly suggests that "manipulating" is a superset of "reading" - if you didn't also read the thoughts of the creature affected by Modify Memory, it would be impossible to "extract the thoughts you read into a thought strand", as Encode Thoughts does. Therefore, this leads me to believe that RAI, you're meant to be able to read thoughts with Modify Memory.
Regardless of Encode Thoughts, I believe it makes sense that Modify Memory allows you to read the creatures' memories. Furthermore, considering that it's a 5th-level spell, whereas Detect Thoughts is 2nd level, I don't think it would be too unbalanced - especially as it only lasts a minute, and you have to describe the event to alter the creature's memory - hence also reading the creature's mind as part of the spell, without knowledge of the event you want to shape, might be too time-consuming anyways. A casting of Detect Thoughts in advance might, therefore, be a wise idea.
Either way, bear in mind that RAW, you can't read a creature's thoughts with Modify Memory (except by making it read them out loud).