This would require DM adjudication.
Short Rest, PHB pg. 186:
A short rest is a period of downtime, at least 1 hour long,
during which a character does nothing more strenuous
than eating, drinking, reading, and tending to wounds.
There are many exceptions to this, namely the Eldritch Knight's Weapon Bond and a Warlock's Pact of the Blade feature which explicitly allow you to also perform a magical ritual during the short rest.
"...as long as it isn't a magical weapon..."
That actually isn't explicitly stated. The exact wording is, emphasis mine:
Attuning to an item requires a creature spend a short rest focused on only that item while being in physical contact with it (this can't be the same short rest used to learn the item's properties). This focus can take the form of weapon practice (for a weapon), meditation (for a wonderous item), or some other appropriate activity.
So attunement can literally be anything your DM says is appropriate for the item. If the DM requires that you practice strenuously with a magical weapon, then no, you won't get your short rest benefits. However if the required attunement activity is simply a short ritual you perform with the weapon, that would not interfere with the short rest.
Ultimately the flavour of this is up to you and the DM to sort out. For example, I would require a character to practice with a Sunblade because it's unlike any other weapon during their short rest. I would not require them to practice with a Flametongue since it's identical to a longsword. The attunement for that weapon would be learning how to command the flame on and off with the bonus action, which wouldn't be strenuous in my opinion, and thus wouldn't strip their short rest benefits.