Arduino libraries work on Atmega1280. Given that Atmega1281 belongs to the same family as Atmega1280 and the difference is a pin reduction in Atmega1281, does Arduino libraries just simply work for Atmega128a with minimal modification? I am not using Arduino IDE. I am using Atmel Studio, so there is no need to care about Arduino IDE settings that might affect compilation.
Yes, with minimal modification. Make sure the AVR-GCC version you are using supports the chip.