The technique where an author gives us direct access to what a character is thinking is called interior monologue. The passage you quote above tells us what the governess is saying in her own mind:
"I wish it wasn't night time. I wish there was another woman in the carriage. I'm frightened of the men next door."
Notice that this is set off from the surrounding text by quotation marks. You're probably familiar with the distinction between direct and indirect speech, but just for the sake of clarity, here's a primer. Suppose I ask a friend whether he likes "The Little Governess", and he responds:
"I like all Mansfield's stories very much."
In relating this exchange to a third party, I could use direct speech, quoting my friend's first person words verbatim:
My friend said, "I like Mansfield's stories very much."
Or I could put his words in indirect speech, replacing his first-person perspective with third person and recasting into past tense:
My friend said he liked Mansfield's stories very much.
An interior monologue isn't speech per se, but the same principle of direct quotation versus indirect reporting applies. In this story, Mansfield switches between giving us direct and indirect access to the governess's thoughts. The quotation marks setting off the passage about how the governess wishes it weren't nighttime indicate that Mansfield is quoting the thoughts of the governess directly; those words are the governess's interior monologue. As you mention in the question, it's what she's saying to herself.
Elsewhere, as you notice, the narration is indirect, even when it's reporting what the governess is thinking and feeling:
A franc! Did he imagine that she was going to give him a franc for playing a trick like that just because she was a girl and travelling alone at night? Never, never!
Mansfield could just as easily have written:
"A franc! Does he imagine that I'm going to give him a franc for playing a trick like that just because I'm a girl and travelling alone at night? Never, never!"
Mansfield switches between direct and indirect reporting of the governess's thoughts quite seamlessly, as in this passage:
"I never could have dared to go to sleep if I had been alone," she decided. "I couldn't have put my feet up or even taken off my hat." The singing gave her a queer little tremble in her stomach and, hugging herself to stop it, with her arms crossed under her cape, she felt really glad to have the old man in the carriage with her.
Through almost the entire story, the narration switches back and forth between direct and indirect reporting of the governess's thoughts. This accomplishes a number of effects:
- Variety. Alternating direct quotation and indirect reporting ensures that we're not looking at long stretches of third-person narrative that could get monotonous.
- Clarity. If the governess's thoughts were all in direct speech, there could be confusing switches between the governess's interior monologue and the dialogue she has with others.
- Immediacy. Third-person narrative does distance the reader from the character. The inclusion of direct quotes of the governess's interior monologue gives us the illusion of immediate, unfiltered access to her thoughts, and keeps the story's pace quicker.
An interesting feature of the story is that the point of view isn't limited to the governess's. At two moments in the story, we see things from other points of view. One brilliant manipulation of narrative point of view is in this passage:
How kindly the old man in the corner watched her bare little hand turning over the big white pages, watched her lips moving as she pronounced the long words to herself, rested upon her hair that fairly blazed under the light. Alas! how tragic for a little governess to possess hair that made one think of tangerines and marigolds, of apricots and tortoiseshell cats and champagne! Perhaps that was what the old man was thinking as he gazed and gazed, and that not even the dark ugly clothes could disguise her soft beauty. Perhaps the flush that licked his cheeks and lips was a flush of rage that anyone so young and tender should have to travel alone and unprotected through the night. Who knows he was not murmuring in his sentimental German fashion: "Ja, es ist eine Tragoedie! Would to God I were the child's grandpapa!"
Another is the very last paragraph of the story, when we see things from the perspective of the waiter who has a grudge against the governess:
When the little governess reached the hall of the Hotel Grunewald the same waiter who had come into her room in the morning was standing by a table, polishing a tray of glasses. The sight of the little governess seemed to fill him out with some inexplicable important content. He was ready for her question; his answer came pat and suave. "Yes, Fräulein, the lady has been here. I told her that you had arrived and gone out again immediately with a gentleman. She asked me when you were coming back again–but of course I could not say. And then she went to the manager." He took up a glass from the table, held it up to the light, looked at it with one eye closed, and started polishing it with a corner of his apron. " . . . ?" "Pardon, Fräulein? Ach, no, Fräulein. The manager could tell her nothing–nothing." He shook his head and smiled at the brilliant glass. "Where is the lady now?" asked the little governess, shuddering so violently that she had to hold her handkerchief up to her mouth. "How should I know?" cried the waiter, and as he swooped past her to pounce upon a new arrival his heart beat so hard against his ribs that he nearly chuckled aloud. "That's it! that's it!" he thought. "That will show her." And as he swung the new arrival's box on to his shoulders–hoop !–as though he were a giant and the box a feather, he minced over again the little governess's words, "Gehen Sie. Gehen Sie sofort. Shall I! Shall I!" he shouted to himself.
These two deviations from the governess's point of view are brilliantly handled, and a full discussion of what they accomplish could be the topic of another question on this site.
One last point: as the comments to your question noted, the part of the question when you report that some Google sites "said, 'we don't include dialogue in third person narration'" is unclear. Which sites? Who is "we"? What does "include dialogue" mean? Please clarify. On the face of it, there's nothing that stops a writer from including dialogue with a third person narrative. In fact, it would be more rare to find a work of fiction written in third person that doesn't include dialogue. Please clarify, ideally by linking to the sites in question.