My textbook explains that when i is to be pronounced as y then the word will be spelled with a j(cujus). But other words(Pompeium) are not spelled with a j. Is this an exception to the pronunciation rules or are there instances where(for whatever reason) consonantal y should not be used. Thank you, Paul.
Some muddle here. Pronunciation is one thing, spelling another. And consonantal y is an English phenomenon (e.g. yoke), not a Latin one.
Some old editions used to use the letter j to represent consonantal i (e.g. jam jam for iam iam!), although j does not exist in Latin. The practice has long been discontinued.
cuius is actually rather complicated, but you can insert a yod glide (or two!) if you wish. The beginning of the word is more problematic.
Pompeius is different again, but you may pronounce it with a long e followed by a yod glide. (The -eius is represented by -ηιος in Greek.)
[Not quite off topic: I once hosted a department party where a Swedish senior colleague asked me “Do you have any use?” Took me a disconcerted moment to realize he meant juice.]