You can certainly do that. HOWEVER, the attic is a very inhospitable place for a sump and a chiller. Chillers do NOT work well over about 95 degrees, and probably not at all in a typical summer attic. They have to exchange the heat they pull from your tank. Ideally, the lower the temperature of their environment, the better.
If you don't mind the run, you can run the piping for a remote sump/chiller through the attic. You would need to insulate the pipes. My chiller is outside, and that's how I ran mine.
Bill
215g FOWLR... and anemones, GSP, gorgonians... carp, that isn't FO!
"I killed my first SW Fish in 1971..."