In British and American Englishes, "sir" and "miss" never go after the name, only before it. I checked the Oxford English Dictionary's pages for "sir", "miss", and "mistress" (because it is the word that "miss" comes from) and it indicates that this has always been true for these words.
It is, however, possible to use "sir" and "miss" on their own, without any name. The OED has the following relevant definitions:
Used as a respectful term of address to a superior or, in later use, an equal[...]; also by schoolchildren in addressing a master
A form of address to a female teacher (corresponding to sir n. 7 [the definition I quoted above]).
Neither of these definitions describe titles. They're used like this: "excuse me, sir" and "no, miss". However, I don't personally use either "sir" or "miss" standalone like this because it sounds old fashioned to me, nor do my peers seem to use it. (I'm American and in my early 20s.)
In my experience, teachers are addressed as one of the following:
- Mr. LastName (for male teachers regardless of marital status)
- Miss LastName (if an unmarried female teacher)
- Mrs. LastName (if a married female teacher)
- Ms. LastName (if I can't remember if she's married or not)
- Dr. LastName (if they hold a doctorate, although this is rare before postsecondary education)
(I've never known anyone who goes by "Sir Name", teacher or not, but it might be different in British English.)
It's possible, although I have no evidence one way or the other, that something like the following morphed into what you're seeing now, in India:
Yes, Mr. Brewster, sir
Delphi Complete Works of Sir Arthur Conan Doyle
"Sir" is not attached to the name here. The name could be removed from the sentence at the expense of making it confusing who was being addressed.
The other (quite likely) possibility is that it originates as confusion between English and the native language of some Indians. (But I don't have any evidence for this either.)