Yes, you're exactly right about the meaning. This is an example of a kind of ellipsis, or leaving words out. It's commonly used for words that would repeat exactly in a single sentence, so
I ate a banana, I ate a pear, and I ate an apple.
would usually omit all but the first "I ate":
I ate a banana, a pear, and an apple.
Note that sometimes we also leave out the articles, even though they aren't exactly the same because of the a/an distinction.
In this case, the "expanded" version of the sentence would be
Moaning Myrtle was crying noisily in her cubicle, but they were ignoring her, and she was ignoring them.
In this case the verb conjugation has changed because the subject of the two clauses is different. This is a little less common than omission when the subject of the clauses is the same, but it's not ungrammatical. One example is the stereotypical formal dialogue between lovers:
A: I love you!
B: And I you!
B leaves out the verb "love" because A already said it. As you guessed, this is just a different way to say "I love you, too": by leaving out the verb, B acknowledges that it was just said by A.1
As an American, this particular kind of ellipsis feels a bit old-fashioned or British to me, so I'm not surprised that it's in a work by a British author. The linked article is from "Grammar and Style in British English", which offers another example where the subject changes:
- I was to take the east path and Steve was to take the west path
- I was to take the east path and Steve, the west.
[by omitting words] that would appear twice in the full sentence. In our example, these are the words was to take and path –
- I was to take the east path and Steve was to take the west path.
1 The couple is so in love, A can finish B's sentences before B even says them!