Yep, and you can also cast a spell at the same time.
Basic set/clear focus without caring what type of target it is would be:
/focus
/clearfocus [mod]
Sets focus on use, clears on modded (ctrl/shift/alt) use.
Could also do like a left click set, right click clear if you wanted to
/focus [btn:1]
/clearfocus [btn:2]