Is it possible to use hooks to jump to another process' running memory, and then jump back, without anything like a DLL injection?

For instance, if process `A` has a procedure `foo` and process `B` has a procedure `bar` with an identical prototype to `foo` (used for a hook), is it possible to hook `foo` to jmp to `bar`, assuming both processes are running?

EDIT: This needs to be done on Windows.