Can I work sitting at a desk with a broken foot in a cast? It swells up when lower than my heart. Is this dangerous? How can I prevent clot while work

It is possible. If swelling is severe, it could cut off the circulation. If you get any discoloration of the toes or experience excessive pain or a feeling of numbness, have it evaluated right asap. To decrease your chances of developing a blood clot you may benefit by being on blood thinning medication or you may try to flex your calf muscles every once in a while and try to move your toes. Get docs advice.