Yes, it WAS. Unfortunately, it has become too heavy to do so with a useful weapon/fuel load.
"Can the f22 be modified for aircrafts or will they keep the f18?"
The F-22 CANNOT be modified for carrier duty. The Navy will keep the F-18 variants for the time being. There's rumors afoot, though.
"F-35 is the one that had multiple countries joining in its development? I always thought that the F-35 was further ahead than the f22."
Yes to the first part, no to the second. The F-22 has been in development for 20+ years, and there are many flying, fully-capable aircraft now. The F-35 has only a couple of prototypes with different engines/systems.
I worked on the F-22 before I retired in 1991. The F-35 wasn't even on the drawing boards.