You don't mention boiling in a plastic bucket so I'll assume you'll use a standard brew kettle for that. However, it's probably possible to boil in a brew bucket but you'd have to deal with softening of the plastic, possible chemical leaching because of the temperature/ph combination, risk of melting a hole in your bucket if the heating element comes into direct contact with the plastic, etc...so not a great idea.
For the rest, yes it can all be done in a single vessel but it would be awkward and IMO, more trouble than it's worth. For mashing you want something that will hold temperature and allow easy access to the grain bed for stirring, cleaning, etc. A bucket meets the 'easy access' part but it's not insulated at all.
For primary/secondary you want something that will make it easy to get rid of trub...which implies something like a conical fermenter -
https://www.thefastrack.ca/main/fastferment for example. This is great for dumping trub but not good for mashing - no easy access for stirring and cleaning, no easy way to keep the grain from clogging the drain...although I suppose you could use a BIAB bag...and I have no idea what the shape would do to your efficiency and there's still the comparatively small hole to get the grains in and out.
There are some 'do everything in one vessel' systems out there like the PicoBrew but for me at least they fall into the 'Wow, that's a lot of money' category.
So what it all boils down to is yeah, you can but why would you want to?
EDIT: Ignore what I said about the Picobrew. It uses different vessels.