I'm sorry for your loss.
So hard to know why he went into decline unless you investigate further through necropsy.
For deworming, you can use Safeguard (Fenbendazole) or Valbazen (Albendazole). I'll post dosing below.
As for feeding a rooster (or non laying chickens) layer feed,
there is information that long term it can affect their health. Many do feed their roosters layer feed and seem to have no problems.
To treat most worms that poultry can have except for Tapeworm you can use Safeguard (Fenbendazole) or Valbazen (Albendazole). Both are given orally by weight; they do not mix well with water.
Safeguard dose is 0.23ml per pound of weight given orally once a day for 5 days in a row.
---OR---
Valbazen dose is 0.08ml per pound of weight given orally once, then repeated in 10 days
Here's how to give oral medications:
https://www.backyardchickens.com/ar...dications-to-all-poultry-and-waterfowl.73335/