For comparison, in English, although I haven't seen this documented: In informal writing, there is a style sometimes used, of using quoted speech without quotation marks. You can make it clearer by setting off the quote with a comma and/or starting the quote with a capital letter. I've usually seen this used with short quotes. For example:
The nurse offered me the bedpan. I demurred. She said, Then I'll have to catheterize you. I bit the bullet.
So, I could imagine something like this:
Me dijo, Se alegraba de que pudiera ir con ellos a la función.
But that sentence doesn't have an informal tone, so it seems anachronistic. This might be more realistic:
Me dijo, Se alegraba de que pudiera acompañarlos.
But even if one can do this in Spanish, which I'm not completely certain of, it seems strange for a textbook. Could you tell us the textbook, edition and page number so we can see the context?