Hi, yes, gas boilers (room-sealed) can be fitted in the attic,
BUT, I have a few customers with them and they do tend to suffer
air-locking as they are the highest point on the system (and usually
don't get installed correctly to auto-vent there) and then you will end
up crawling into the attic to reset or check it.
Some servicemen also refuse to service or repair boilers in attics!