it is written in every book that foreign keys are actually primary key in some other table but can we have a foreign key which is not primary key in any other table
Yes , There can be a foreign key which is unique key in other table as Unique key is subset of primary key but not the exact primary key.
So that's possible that foreign key is unique key in aother table.