Yes, the device number of a block device can change: these are assigned dynamically when the system boots up. Adding and removing devices (and sometimes even changes to your BIOS firmware) can result in things being discovered in a different order, and thus having different device ids.
If you want to uniquely identify a filesystem, use the filesystem UUID (available e.g. from the `blkid` command).
Using the inode as an identifier may also be problematic, depending on what you're trying to do: for example, a single file may be present in multiple locations with the same inode due to hard links, and inodes can be recycled for new files when the files with which they were originally associated are deleted.