You can't use methods that may panic on OOM like Vec::push or Box::new. This means that close to 100% of crates that use the stdlib won't be usable in the kernel without modifications.
If this is out of tree, AFAIK you can use these all you want. Whether or not you _should_ is obviously a different matter.
In Rust the alloc library's Vec has a function Vec::push(&mut self, value: T)
https://doc.rust-lang.org/std/vec/struct.Vec.html#method.pus...
In Rust for Linux their custom alloc library does not have that function offering instead Vec::try_push(&mut self, value: T) -> Result<(), TryReserveError>
https://rust-for-linux.github.io/docs/alloc/vec/struct.Vec.h...