As long as it's a high pressure tank, there is no safety risk. High pressure O2 is stored at well over 1,000 psi. CO2 tops out around 800 psi (at room temperature).
I don't know anything about the legality, but I suspect that if you label the tank correctly (and potentially paint it a color other than green), it won't be an issue.