I think this word you like (sorry, phone won't do hangeul) means "student in the same level/grade/form" which isn't necessarily the same thing as one in the same class.
Bruh in everyday language you would just say 같은 반 친구 or something along those lines? When I attended school in Korea I hardly ever heard 동급생 being used.
동급생 is kinda outdated word and so is only used in literature or among older people. It definitely means a classmate but it sounds really awkward when used in an everyday language.